text:
<?xml version="1.0" encoding="UTF-8"?>
<iterations type="array">
  <iteration>
    <id type="integer">196</id>
    <number type="integer">196</number>
    <start type="datetime">2012/08/20 05:00:00 UTC</start>
    <finish type="datetime">2012/08/27 05:00:00 UTC</finish>
    <team_strength type="float">1</team_strength>
    <stories type="array">
      <story>
        <id type="integer">33482989</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/33482989</url>
        <current_state>accepted</current_state>
        <description>TeamCity Chained projects are projects that depend on other build in addition to having their own build target.
Desired behaviour would be for a Chained Project to go red as soon as any of its children/dependencies are red, or it itself is red.  The detection of children should be automatic, so that any configuration change on TeamCity immediately impacts what children are polled for status.</description>
        <name>TeamCity Chained projects are currently not working</name>
        <created_at type="datetime">2012/07/27 14:39:45 UTC</created_at>
        <updated_at type="datetime">2012/08/20 14:58:12 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 14:58:11 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34249523</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34249523</url>
        <current_state>accepted</current_state>
        <description>Enables Chef'ing of a project monitor box. From John Barker:
"Perhaps a combination of fields would make a good unique identifier, or we could store a slug(guid) generated upon creation that never changes."</description>
        <name>On import from YAML, a project should not be created if it already exists</name>
        <created_at type="datetime">2012/08/11 15:34:16 UTC</created_at>
        <updated_at type="datetime">2012/08/20 15:05:41 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 15:05:41 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34321991</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34321991</url>
        <current_state>accepted</current_state>
        <description>Currently config.import, if it fails, will leave some number of importing projects in the database and then add them again next time.
</description>
        <name>Do config.import in a transaction</name>
        <created_at type="datetime">2012/08/13 19:07:49 UTC</created_at>
        <updated_at type="datetime">2012/08/20 15:11:55 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 15:11:54 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34171221</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34171221</url>
        <current_state>accepted</current_state>
        <description></description>
        <name>If a build is green and the next build is in progress but red, the project should go red immediately. If a build is red and the next build in progress is green, it should remain red.</name>
        <created_at type="datetime">2012/08/09 20:14:03 UTC</created_at>
        <updated_at type="datetime">2012/08/20 15:19:55 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 15:19:55 UTC</accepted_at>
        <labels>blocked</labels>
      </story>
      <story>
        <id type="integer">33054463</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/33054463</url>
        <estimate type="integer">3</estimate>
        <current_state>accepted</current_state>
        <description>* If enabled require basic auth to access view and admin pages
* Allow ability to whitelist certain IPs (i.e. the Pivotal offices)
* Example of this is on the pivotal concierge page - https://github.com/pivotalprivate/concierge/blob/master/app.rb
* Don't require basic auth for webhook because they have shareds secret
</description>
        <name>Support basic auth with IP whitelisting</name>
        <created_at type="datetime">2012/07/19 15:16:59 UTC</created_at>
        <updated_at type="datetime">2012/08/20 15:26:49 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 15:26:48 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34465543</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34465543</url>
        <current_state>accepted</current_state>
        <description>Do this: rake cimonitor:force_update
When you have projects with no CI details and webhooks enabled
Yielding this error: Failed to update project 'Team City', reason: undefined method `+' for nil:NilClass
May impact other areas.</description>
        <name>Force updating of project statuses tries to update projects with webhooks_enabled</name>
        <created_at type="datetime">2012/08/15 20:25:06 UTC</created_at>
        <updated_at type="datetime">2012/08/20 15:28:06 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 15:28:06 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34458181</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34458181</url>
        <current_state>accepted</current_state>
        <description>It points to /projects/:id</description>
        <name>Jenkins project link on the CODE label is broken in some situations</name>
        <created_at type="datetime">2012/08/15 18:42:02 UTC</created_at>
        <updated_at type="datetime">2012/08/20 15:29:04 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 15:29:04 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34390175</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34390175</url>
        <current_state>accepted</current_state>
        <description></description>
        <name>Configuration export endpoint is returning a 406</name>
        <created_at type="datetime">2012/08/14 18:23:10 UTC</created_at>
        <updated_at type="datetime">2012/08/20 15:29:16 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 15:29:16 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34296277</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34296277</url>
        <estimate type="integer">1</estimate>
        <current_state>accepted</current_state>
        <description>Should update both when polling and webhooked</description>
        <name>Add last refreshed time to admin interface</name>
        <created_at type="datetime">2012/08/13 14:21:20 UTC</created_at>
        <updated_at type="datetime">2012/08/20 15:34:42 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 15:34:42 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">33812135</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/33812135</url>
        <current_state>accepted</current_state>
        <description>The routes:  match 'projects/validate_tracker_project' and match 'projects/validate_build_info' poll an external server and can lock up the server for long periods of time, they should do their work asynchronously and provide an endpoint for polling the result.</description>
        <name>Asynchronous validation of CI and tracker settings</name>
        <created_at type="datetime">2012/08/02 21:11:47 UTC</created_at>
        <updated_at type="datetime">2012/08/20 15:36:41 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 15:36:41 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34533901</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34533901</url>
        <current_state>accepted</current_state>
        <description></description>
        <name>Configuration import regression with older exports and ec2_ attributes</name>
        <created_at type="datetime">2012/08/16 21:03:54 UTC</created_at>
        <updated_at type="datetime">2012/08/20 18:13:09 UTC</updated_at>
        <accepted_at type="datetime">2012/08/20 18:13:09 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34295507</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34295507</url>
        <estimate type="integer">3</estimate>
        <current_state>accepted</current_state>
        <description></description>
        <name>Generate Sinatra app to simulate webhook payloads for acceptance</name>
        <created_at type="datetime">2012/08/13 14:10:37 UTC</created_at>
        <updated_at type="datetime">2012/08/21 13:47:35 UTC</updated_at>
        <accepted_at type="datetime">2012/08/21 13:47:35 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34386681</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34386681</url>
        <current_state>accepted</current_state>
        <description>This may or may not be a serious problem, it appears as though when this happens it's mostly just a no-op. i.e. no statuses are made, but the project is set to online and the last_refreshed_at is updated.</description>
        <name>Don't record project refreshed at if it was not refreshed</name>
        <created_at type="datetime">2012/08/14 17:44:56 UTC</created_at>
        <updated_at type="datetime">2012/08/21 13:52:15 UTC</updated_at>
        <accepted_at type="datetime">2012/08/21 13:52:15 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34513585</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34513585</url>
        <current_state>accepted</current_state>
        <description>The webhooks controller is pretty naive in processing all incoming payloads using the rack params hash, but this does not account for webhooks passed in as raw content via the request.body. If the payload contains a & it will be split and passed as two separate params and the Jenkins Payload processor will asplode.</description>
        <name>Jenkins Payload processor will explode if the payload contains the & character</name>
        <created_at type="datetime">2012/08/16 15:56:08 UTC</created_at>
        <updated_at type="datetime">2012/08/21 13:55:09 UTC</updated_at>
        <accepted_at type="datetime">2012/08/21 13:55:09 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34437217</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34437217</url>
        <estimate type="integer">1</estimate>
        <current_state>accepted</current_state>
        <description></description>
        <name>Add semaphore payload to ci simulator</name>
        <created_at type="datetime">2012/08/15 13:34:09 UTC</created_at>
        <updated_at type="datetime">2012/08/21 15:03:03 UTC</updated_at>
        <accepted_at type="datetime">2012/08/21 15:03:03 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34415231</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34415231</url>
        <estimate type="integer">2</estimate>
        <current_state>accepted</current_state>
        <description>SemaphoreApp is a hosted solution similar to TravisCI, but supports private projects.
Docs available at http://docs.semaphoreci.com/api</description>
        <name>Add support for SemaphoreApp as a build agent</name>
        <created_at type="datetime">2012/08/15 01:30:13 UTC</created_at>
        <updated_at type="datetime">2012/08/21 15:04:30 UTC</updated_at>
        <accepted_at type="datetime">2012/08/21 15:04:30 UTC</accepted_at>
        <tasks type="array">
          <task>
            <id type="integer">9036771</id>
            <description>Add semaphore project type to edit screen</description>
            <position type="integer">1</position>
            <complete type="boolean">true</complete>
            <created_at type="datetime">2012/08/15 13:35:46 UTC</created_at>
          </task>
          <task>
            <id type="integer">9036777</id>
            <description>Ability to add and edit a semaphore project</description>
            <position type="integer">2</position>
            <complete type="boolean">true</complete>
            <created_at type="datetime">2012/08/15 13:35:54 UTC</created_at>
          </task>
          <task>
            <id type="integer">9037003</id>
            <description>Add support for polling semaphore projects / parsing their payloads</description>
            <position type="integer">3</position>
            <complete type="boolean">true</complete>
            <created_at type="datetime">2012/08/15 13:36:10 UTC</created_at>
          </task>
          <task>
            <id type="integer">9037007</id>
            <description>Add support for webhooks</description>
            <position type="integer">4</position>
            <complete type="boolean">true</complete>
            <created_at type="datetime">2012/08/15 13:36:14 UTC</created_at>
          </task>
        </tasks>
      </story>
      <story>
        <id type="integer">33728893</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/33728893</url>
        <estimate type="integer">2</estimate>
        <current_state>accepted</current_state>
        <description>It's difficult for an admin to know how polling of their project status is working or if its not, why it's failing.
I suggest a column in the project list which indicates the 'status' of a project (for lack of a better name). This indicates that we've recently been able to poll (or gotten a successful webhook update) which was passed correctly.
If this has recently failed, you could click on it to see a log of recent errors for the project updater.
--
If a project is currently failing display a "yellow" indicator. If polling as been disabled due to too many failures display a "red" indicator
</description>
        <name>Status indicator for projects</name>
        <created_at type="datetime">2012/08/01 17:55:58 UTC</created_at>
        <updated_at type="datetime">2012/08/21 16:13:46 UTC</updated_at>
        <accepted_at type="datetime">2012/08/21 16:13:45 UTC</accepted_at>
        <labels>stale-builds</labels>
        <attachments type="array">
          <attachment>
            <id type="integer">11033757</id>
            <filename>Screen_Shot_2012-08-21_at_11.22.17_AM.png</filename>
            <description>Attached an example of what I mean in the above comment.</description>
            <uploaded_by>John Barker</uploaded_by>
            <uploaded_at type="datetime">2012/08/21 15:22:48 UTC</uploaded_at>
            <url>https://www.pivotaltracker.com/resource/download/11033757</url>
          </attachment>
        </attachments>
      </story>
      <story>
        <id type="integer">33954419</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/33954419</url>
        <estimate type="integer">1</estimate>
        <current_state>accepted</current_state>
        <description>Add checkbox indicating webhooks. When enabled hide the polling fields from the admin interface and disable polling.</description>
        <name>Disable polling when webhooks enabled</name>
        <created_at type="datetime">2012/08/06 18:26:42 UTC</created_at>
        <updated_at type="datetime">2012/08/21 17:56:57 UTC</updated_at>
        <accepted_at type="datetime">2012/08/21 17:56:52 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34754151</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34754151</url>
        <current_state>accepted</current_state>
        <description></description>
        <name>Can't update team city projects</name>
        <created_at type="datetime">2012/08/21 19:58:11 UTC</created_at>
        <updated_at type="datetime">2012/08/21 21:17:05 UTC</updated_at>
        <accepted_at type="datetime">2012/08/21 21:17:05 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34754161</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34754161</url>
        <current_state>accepted</current_state>
        <description></description>
        <name>Can't update team city dependent projects</name>
        <created_at type="datetime">2012/08/21 19:58:24 UTC</created_at>
        <updated_at type="datetime">2012/08/21 21:17:06 UTC</updated_at>
        <accepted_at type="datetime">2012/08/21 21:17:06 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34671283</id>
        <project_id type="integer">2872</project_id>
        <story_type>chore</story_type>
        <url>https://www.pivotaltracker.com/story/show/34671283</url>
        <current_state>accepted</current_state>
        <description>Looks like Tddium doesn't support webhooks. Lets reach out and see if it's on their roadmap.</description>
        <name>Request webhook integration from Tddium</name>
        <created_at type="datetime">2012/08/20 18:38:24 UTC</created_at>
        <updated_at type="datetime">2012/08/22 17:36:59 UTC</updated_at>
        <accepted_at type="datetime">2012/08/22 17:36:51 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34748215</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34748215</url>
        <current_state>accepted</current_state>
        <description>Should use consistent titlecase</description>
        <name>Wrong case for status column</name>
        <created_at type="datetime">2012/08/21 18:39:29 UTC</created_at>
        <updated_at type="datetime">2012/08/23 17:54:41 UTC</updated_at>
        <accepted_at type="datetime">2012/08/23 17:54:41 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34813111</id>
        <project_id type="integer">2872</project_id>
        <story_type>chore</story_type>
        <url>https://www.pivotaltracker.com/story/show/34813111</url>
        <current_state>accepted</current_state>
        <description></description>
        <name>Remove stale projects on production</name>
        <created_at type="datetime">2012/08/22 16:53:36 UTC</created_at>
        <updated_at type="datetime">2012/08/24 12:43:12 UTC</updated_at>
        <accepted_at type="datetime">2012/08/24 12:43:07 UTC</accepted_at>
      </story>
      <story>
        <id type="integer">34330705</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34330705</url>
        <current_state>delivered</current_state>
        <description></description>
        <name>Webhooks projects don't have working build links</name>
        <created_at type="datetime">2012/08/13 21:07:24 UTC</created_at>
        <updated_at type="datetime">2012/08/22 20:27:22 UTC</updated_at>
        <tasks type="array">
          <task>
            <id type="integer">9113437</id>
            <description>Verify that project is not linked until we know where to link it to.</description>
            <position type="integer">1</position>
            <complete type="boolean">false</complete>
            <created_at type="datetime">2012/08/20 14:35:25 UTC</created_at>
          </task>
        </tasks>
      </story>
      <story>
        <id type="integer">34569303</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34569303</url>
        <current_state>delivered</current_state>
        <description>This seems like a bug.</description>
        <name>last_refreshed_at is accessible for the project?</name>
        <created_at type="datetime">2012/08/17 14:44:55 UTC</created_at>
        <updated_at type="datetime">2012/08/22 21:35:00 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34758725</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34758725</url>
        <current_state>delivered</current_state>
        <description></description>
        <name>clicking "show backtrace" shouldn't open all backtraces</name>
        <created_at type="datetime">2012/08/21 20:52:45 UTC</created_at>
        <updated_at type="datetime">2012/08/23 18:13:10 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34535891</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34535891</url>
        <estimate type="integer">1</estimate>
        <current_state>delivered</current_state>
        <description>Split this out into a separate feature because it requires extra consideration (i.e. persisting the url after we get it from a build status update or asking the user to enter it for us).
We may be able to convince semaphore to provide a way of figuring it out/accessing it from the api url.</description>
        <name>Point CODE for semaphore projects at latest build</name>
        <created_at type="datetime">2012/08/16 21:34:08 UTC</created_at>
        <updated_at type="datetime">2012/08/24 01:52:46 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34670897</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34670897</url>
        <estimate type="integer">2</estimate>
        <current_state>delivered</current_state>
        <description>Tddium is a hosted service similar to Semaphore / Travis. According to Jeff S. it looks like it supports a Cruise Control compatible XML. Please work with Jeff to integrate support using his project as an example.</description>
        <name>Support Tddium</name>
        <created_at type="datetime">2012/08/20 18:33:30 UTC</created_at>
        <updated_at type="datetime">2012/08/24 18:47:02 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34762183</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34762183</url>
        <estimate type="integer">1</estimate>
        <current_state>delivered</current_state>
        <description></description>
        <name>"Test" button to deliberately test CI configuration without having to blur on of the input fields</name>
        <created_at type="datetime">2012/08/21 21:42:21 UTC</created_at>
        <updated_at type="datetime">2012/08/24 18:47:01 UTC</updated_at>
      </story>
      <story>
        <id type="integer">33845309</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/33845309</url>
        <estimate type="integer">2</estimate>
        <current_state>delivered</current_state>
        <description>Currently the CI status flag in the edit screen of a project is confusing. What makes it success vs. error?
--
When clicking on this status it should take you to a page with a log of all the statuses</description>
        <name>Add more detail to CI verification in project edit page</name>
        <created_at type="datetime">2012/08/03 13:40:05 UTC</created_at>
        <updated_at type="datetime">2012/08/24 18:47:00 UTC</updated_at>
        <labels>stale-builds</labels>
        <tasks type="array">
          <task>
            <id type="integer">9153997</id>
            <description>Show the exception message as a tooltip on the "Error" text</description>
            <position type="integer">1</position>
            <complete type="boolean">true</complete>
            <created_at type="datetime">2012/08/21 21:39:53 UTC</created_at>
          </task>
          <task>
            <id type="integer">9153987</id>
            <description>When loading the project edit page, if there is a record of a previous failure - show that error instead of trying to poll it again</description>
            <position type="integer">2</position>
            <complete type="boolean">true</complete>
            <created_at type="datetime">2012/08/21 21:39:27 UTC</created_at>
          </task>
        </tasks>
      </story>
      <story>
        <id type="integer">33953733</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/33953733</url>
        <estimate type="integer">2</estimate>
        <current_state>delivered</current_state>
        <description>This implies we have contact details for the project admin. Maybe we want a notification email address as an attribute within the project settings?</description>
        <name>Notify project admin when polling disabled </name>
        <created_at type="datetime">2012/08/06 18:19:56 UTC</created_at>
        <updated_at type="datetime">2012/08/24 18:46:59 UTC</updated_at>
        <labels>stale-builds</labels>
      </story>
      <story>
        <id type="integer">34903611</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34903611</url>
        <current_state>delivered</current_state>
        <description>The url generator methods add the scheme, which then causes the poller to try and retrieve http://http://myhost.com</description>
        <name>Team city projects allow you to enter a url with a scheme, which doesn't work</name>
        <created_at type="datetime">2012/08/23 20:28:52 UTC</created_at>
        <updated_at type="datetime">2012/08/24 19:08:51 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34651321</id>
        <project_id type="integer">2872</project_id>
        <story_type>chore</story_type>
        <url>https://www.pivotaltracker.com/story/show/34651321</url>
        <current_state>started</current_state>
        <description></description>
        <name>Submit feature request to Travis CI & Semaphore for webhook when build starts</name>
        <created_at type="datetime">2012/08/20 14:24:54 UTC</created_at>
        <updated_at type="datetime">2012/08/22 17:37:28 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34792571</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34792571</url>
        <estimate type="integer">2</estimate>
        <current_state>started</current_state>
        <description>We currently use Delayed::Job for polling CI systems. This is a poor design. IO bound polling is not well suited for a threading framework, especially one with a very small set of available threads.
Typically this means that if ~3 projects take a long time to poll, the system gets backlogged (Delayed::Job is set to only use 3 jobs). It also means that the project needs 4 connections to the database at any one time, and only for an almost instantaneous update. We could increase the number of jobs available but this can cause quite a large increase in memory usage and will likely hit DB limits on hosts like Heroku.
We should change this to use the reactor pattern, it is very performant for this type of usage. Two possible candidates for this in Ruby land are Typheous or Eventmachine. Typheous[https://rubygems.org/gems/typhoeus] looks the most simple of the two, but it doesn't look like it allows ad hoc queuing of requests once you're in its event loop. Eventmachine[https://rubygems.org/gems/eventmachine] looks like the more capable solution, but looks a little more complex and involved. Neither of these unfortunately do HTTP client requests quite as well as say restclient or httpclient, so we'll possibly need to package certificates and handle authentication a little more explicitly (We had to remove httpclient recently so this is a bit of a moot point).</description>
        <name>Improve polling efficiency</name>
        <created_at type="datetime">2012/08/22 12:40:23 UTC</created_at>
        <updated_at type="datetime">2012/08/23 20:40:08 UTC</updated_at>
        <tasks type="array">
          <task>
            <id type="integer">9180081</id>
            <description>Support polling of project CI status in ASIO</description>
            <position type="integer">1</position>
            <complete type="boolean">true</complete>
            <created_at type="datetime">2012/08/22 21:06:00 UTC</created_at>
          </task>
          <task>
            <id type="integer">9180089</id>
            <description>Support polling of tracker status using ASIO</description>
            <position type="integer">2</position>
            <complete type="boolean">false</complete>
            <created_at type="datetime">2012/08/22 21:06:09 UTC</created_at>
          </task>
          <task>
            <id type="integer">9180093</id>
            <description>Support polling of dependent children using ASIO</description>
            <position type="integer">3</position>
            <complete type="boolean">false</complete>
            <created_at type="datetime">2012/08/22 21:06:22 UTC</created_at>
          </task>
          <task>
            <id type="integer">9202085</id>
            <description>Support authentication in ASIO polling of CI</description>
            <position type="integer">4</position>
            <complete type="boolean">false</complete>
            <created_at type="datetime">2012/08/23 20:40:08 UTC</created_at>
          </task>
        </tasks>
      </story>
    </stories>
  </iteration>
  <iteration>
    <id type="integer">197</id>
    <number type="integer">197</number>
    <start type="datetime">2012/08/27 05:00:00 UTC</start>
    <finish type="datetime">2012/09/03 05:00:00 UTC</finish>
    <team_strength type="float">1</team_strength>
    <stories type="array">
      <story>
        <id type="integer">34762301</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34762301</url>
        <estimate type="integer">-1</estimate>
        <current_state>unstarted</current_state>
        <description>It's correct not to put the password in the form when rendered, but it's a little confusing since the project actually has a password stored against it.
It would be nice if we could somehow show the password field full of *s to indicate a password is strored, clear the text as soon as you click on the password field.</description>
        <name>Password field on project edit screen should show that a password is stored</name>
        <created_at type="datetime">2012/08/21 21:44:08 UTC</created_at>
        <updated_at type="datetime">2012/08/24 19:10:34 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34761605</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34761605</url>
        <current_state>unstarted</current_state>
        <description>Open an existing project with valid CI fields, adjust one of the fields, it will now fail because the password is not resubmitted by the form.</description>
        <name>CI status indicator fails if password is stored on server, but not entered in form</name>
        <created_at type="datetime">2012/08/21 21:33:05 UTC</created_at>
        <updated_at type="datetime">2012/08/24 19:11:00 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34464655</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34464655</url>
        <current_state>unstarted</current_state>
        <description>* Semaphore doesn't require username / password
* Travis is public and doesn't require username / password</description>
        <name>Feed username and password fields appear for a project even when not needed</name>
        <created_at type="datetime">2012/08/15 20:15:32 UTC</created_at>
        <updated_at type="datetime">2012/08/24 19:11:04 UTC</updated_at>
      </story>
      <story>
        <id type="integer">33953695</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/33953695</url>
        <estimate type="integer">1</estimate>
        <current_state>unstarted</current_state>
        <description></description>
        <name>Extend polling time after failed attempt</name>
        <created_at type="datetime">2012/08/06 18:19:20 UTC</created_at>
        <updated_at type="datetime">2012/08/22 13:42:33 UTC</updated_at>
        <labels>*blocked*,stale-builds</labels>
      </story>
      <story>
        <id type="integer">33953705</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/33953705</url>
        <estimate type="integer">1</estimate>
        <current_state>unstarted</current_state>
        <description></description>
        <name>Disable polling after 3 failed attempts</name>
        <created_at type="datetime">2012/08/06 18:19:29 UTC</created_at>
        <updated_at type="datetime">2012/08/22 13:42:38 UTC</updated_at>
        <labels>*blocked*,stale-builds</labels>
        <tasks type="array">
          <task>
            <id type="integer">9148499</id>
            <description>Mark failed projects with a 'disabled' like flag</description>
            <position type="integer">1</position>
            <complete type="boolean">false</complete>
            <created_at type="datetime">2012/08/21 18:31:35 UTC</created_at>
          </task>
          <task>
            <id type="integer">9148541</id>
            <description>Add a log entry to the project log to say that it has been disabled due to reaching the maximum consecutive attempts</description>
            <position type="integer">2</position>
            <complete type="boolean">false</complete>
            <created_at type="datetime">2012/08/21 18:32:21 UTC</created_at>
          </task>
        </tasks>
      </story>
      <story>
        <id type="integer">34732535</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34732535</url>
        <estimate type="integer">1</estimate>
        <current_state>unstarted</current_state>
        <description></description>
        <name>Status indicator should show when a project has polling disabled</name>
        <created_at type="datetime">2012/08/21 15:18:08 UTC</created_at>
        <updated_at type="datetime">2012/08/22 13:43:05 UTC</updated_at>
        <labels>*blocked*</labels>
      </story>
      <story>
        <id type="integer">34757869</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34757869</url>
        <estimate type="integer">-1</estimate>
        <current_state>unstarted</current_state>
        <description>Should show something like 'disabled' instead of 'polling succeeded'</description>
        <name>Shouldn't show a build status for a project that is disabled</name>
        <created_at type="datetime">2012/08/21 20:39:50 UTC</created_at>
        <updated_at type="datetime">2012/08/23 14:43:11 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34832225</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34832225</url>
        <estimate type="integer">-1</estimate>
        <current_state>unstarted</current_state>
        <description>Maybe delete ones older than a few days or a week?</description>
        <name>Prune payload log entries</name>
        <created_at type="datetime">2012/08/22 20:43:20 UTC</created_at>
        <updated_at type="datetime">2012/08/23 14:43:39 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34755657</id>
        <project_id type="integer">2872</project_id>
        <story_type>chore</story_type>
        <url>https://www.pivotaltracker.com/story/show/34755657</url>
        <current_state>unstarted</current_state>
        <description>This looks like it's not used anymore, it's also reimplementing half the parsing and fetching framework.</description>
        <name>Remove TeamCityBuildStatus</name>
        <created_at type="datetime">2012/08/21 20:18:56 UTC</created_at>
        <updated_at type="datetime">2012/08/23 14:43:20 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34792567</id>
        <project_id type="integer">2872</project_id>
        <story_type>chore</story_type>
        <url>https://www.pivotaltracker.com/story/show/34792567</url>
        <current_state>unstarted</current_state>
        <description>The parsing modules are quite badly designed and exhibit the following problems:
1. There are multiple points of failure, scattered throughout the code
2. Invalid payloads can sometimes be treated as valid ones, but produce unexpected results
3. Parsing is complex and difficult to understand
4. The modules for parsing are named after their implementation instead of their purpose
5. They rescue exceptions not related to parsing, which could hide faults in the parser
6. Treating a project as offline because we couldn't parse it is misleading
7. Payloads are not treated atomically, if we can parse part of a payload we could still get changes. If we can't trust part of a payload we should not trust ALL of it.
8. We don't log many kinds of parser failures so often can't diagnose problems
9. None of the parsers have unit tests
Our parsing requirements are not complex, this design can be drastically simplified without a great deal of work.</description>
        <name>Refactor parsing</name>
        <created_at type="datetime">2012/08/22 12:40:11 UTC</created_at>
        <updated_at type="datetime">2012/08/23 14:42:52 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34758511</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34758511</url>
        <current_state>unstarted</current_state>
        <description>Partially due to the bad design of the parsing, it seems like there are some situations where we'll have too many log entries for a project e.g: a success log entry followed by a failed entry.</description>
        <name>Project failure could introduce excessive log entries</name>
        <created_at type="datetime">2012/08/21 20:50:01 UTC</created_at>
        <updated_at type="datetime">2012/08/23 14:43:03 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34872545</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34872545</url>
        <current_state>unstarted</current_state>
        <description>Polling in semaphore only gets the 'current' build so if the polling doesn't happen frequently enough builds will be missed.</description>
        <name>Semaphore polling misses builds</name>
        <created_at type="datetime">2012/08/23 13:40:31 UTC</created_at>
        <updated_at type="datetime">2012/08/23 14:42:30 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34520899</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34520899</url>
        <current_state>unstarted</current_state>
        <description>You could easily ask the server for a GUID, generate one when the page is loaded (in the new action) or ask the javascript to do it.</description>
        <name>When creating a new travis project you get a strange warning "Your webhooks URL is not yet configured" </name>
        <created_at type="datetime">2012/08/16 17:45:32 UTC</created_at>
        <updated_at type="datetime">2012/08/20 14:39:46 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34573471</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34573471</url>
        <current_state>unstarted</current_state>
        <description></description>
        <name>Project CI validator should return 4xx code when it fails rather than 500</name>
        <created_at type="datetime">2012/08/17 15:46:05 UTC</created_at>
        <updated_at type="datetime">2012/08/20 14:38:49 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34573947</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34573947</url>
        <current_state>unstarted</current_state>
        <description></description>
        <name>The Payload updater will still try to update dependent builds even if it was unable to process the parent build</name>
        <created_at type="datetime">2012/08/17 15:54:18 UTC</created_at>
        <updated_at type="datetime">2012/08/20 14:38:54 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34668605</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34668605</url>
        <current_state>unstarted</current_state>
        <description>We've been rethinking this problem. Essentially the reasons parsing would fail are:
1. Corrupted transmission. Incredibly unlikely we are after all using TCP transmission.
2. Bad / garbage data. Highly unlikely, could be caused by broken CI implementation - we should definitely fail and log if this happens.
3. The payload format has changed or been encoded differently and we can no longer parse it properly. Definitely fail and log.
So it seems we shouldn't just fail silently, we should at the very least log an error to improve visibility and speed a resolution.</description>
        <name>If a project payload fails to parse there is no record of the error</name>
        <created_at type="datetime">2012/08/20 18:02:52 UTC</created_at>
        <updated_at type="datetime">2012/08/20 18:33:57 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34754901</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34754901</url>
        <current_state>unstarted</current_state>
        <description>We recently removed the hand rolled URLRetrieve and replaced it with httpclient, unfortunately it doesn't do auth properly, we should fix this (perhaps doing it wrongly?) or use another gem.</description>
        <name>HTTPClient rewrite authentication doesn't work</name>
        <created_at type="datetime">2012/08/21 20:09:46 UTC</created_at>
        <updated_at type="datetime">2012/08/21 20:09:50 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34572433</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34572433</url>
        <current_state>unstarted</current_state>
        <description></description>
        <name>Project CI status checker says error when some fields are missing, but should really report this as 'incomplete, or some fields are required'</name>
        <created_at type="datetime">2012/08/17 15:32:21 UTC</created_at>
        <updated_at type="datetime">2012/08/22 13:43:51 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34760893</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34760893</url>
        <current_state>unstarted</current_state>
        <description></description>
        <name>webhooks/polling not checked for projects defaulting to polling</name>
        <created_at type="datetime">2012/08/21 21:20:20 UTC</created_at>
        <updated_at type="datetime">2012/08/22 21:05:42 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34761367</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34761367</url>
        <current_state>unstarted</current_state>
        <description>build_ids should never be used for sorting of build statuses because we can't guarantee their order or uniqueness</description>
        <name>Ordering of build statuses by ID falls over if IDs get recycled</name>
        <created_at type="datetime">2012/08/21 21:28:44 UTC</created_at>
        <updated_at type="datetime">2012/08/22 21:05:43 UTC</updated_at>
      </story>
      <story>
        <id type="integer">34227969</id>
        <project_id type="integer">2872</project_id>
        <story_type>bug</story_type>
        <url>https://www.pivotaltracker.com/story/show/34227969</url>
        <current_state>unstarted</current_state>
        <description>All of the images in the admin interface are returning zero bytes.
For example: http://unpakt-ci-worker.local:3000/assets/pivotallabs-logo-f28053897993a75374386087f3c2b0e5.png gives a 200 OK with a zero byte file back. Weird. The file is ok in app/assets/images.</description>
        <name>broken images in Admin interface on local install (non-heroku)</name>
        <created_at type="datetime">2012/08/10 19:26:36 UTC</created_at>
        <updated_at type="datetime">2012/08/22 21:06:29 UTC</updated_at>
      </story>
      <story>
        <id type="integer">32536823</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/32536823</url>
        <estimate type="integer">-1</estimate>
        <current_state>unstarted</current_state>
        <description>Need to update the layout of the admin pages to reflect the new design
Possible idea for tabs: http://jqueryui.com/demos/tabs/</description>
        <name>Update layout of admin page</name>
        <created_at type="datetime">2012/07/10 16:13:19 UTC</created_at>
        <updated_at type="datetime">2012/08/20 14:42:38 UTC</updated_at>
        <labels>needs_design</labels>
      </story>
      <story>
        <id type="integer">34038929</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/34038929</url>
        <estimate type="integer">1</estimate>
        <current_state>unstarted</current_state>
        <description></description>
        <name>Rake setup should set up auth/crypto stuff</name>
        <created_at type="datetime">2012/08/07 21:43:51 UTC</created_at>
        <updated_at type="datetime">2012/08/13 14:27:58 UTC</updated_at>
      </story>
      <story>
        <id type="integer">33053797</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/33053797</url>
        <estimate type="integer">1</estimate>
        <current_state>unstarted</current_state>
        <description></description>
        <name>auto-completer for tag names</name>
        <created_at type="datetime">2012/07/19 15:09:24 UTC</created_at>
        <updated_at type="datetime">2012/08/23 18:22:44 UTC</updated_at>
        <labels>interview</labels>
      </story>
    </stories>
  </iteration>
  <iteration>
    <id type="integer">198</id>
    <number type="integer">198</number>
    <start type="datetime">2012/09/03 05:00:00 UTC</start>
    <finish type="datetime">2012/09/10 05:00:00 UTC</finish>
    <team_strength type="float">1</team_strength>
    <stories type="array">
      <story>
        <id type="integer">33004371</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/33004371</url>
        <estimate type="integer">1</estimate>
        <current_state>unstarted</current_state>
        <description></description>
        <name>Remove admin links and replace with a /admin url</name>
        <created_at type="datetime">2012/07/18 18:48:43 UTC</created_at>
        <updated_at type="datetime">2012/08/13 14:27:40 UTC</updated_at>
      </story>
      <story>
        <id type="integer">33720133</id>
        <project_id type="integer">2872</project_id>
        <story_type>feature</story_type>
        <url>https://www.pivotaltracker.com/story/show/33720133</url>
        <estimate type="integer">1</estimate>
        <current_state>unstarted</current_state>
        <description></description>
        <name>Document/blog about webhooks</name>
        <created_at type="datetime">2012/08/01 16:04:34 UTC</created_at>
        <updated_at type="datetime">2012/08/13 14:14:40 UTC</updated_at>
      </story>
    </stories>
  </iteration>
</iterations>


text:
<?php

/**
 * @file
 * Contains Drupal\views\Tests\Handler\FieldGroupRowsTest.
 */

namespace Drupal\views\Tests\Handler;

use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\views\Views;

/**
 * Tests the "Display all values in the same row" setting.
 *
 * @see \Drupal\views\Plugin\views\field\Field
 *
 * @group views
 */
class FieldGroupRowsTest extends HandlerTestBase {

  /**
   * Views used by this test.
   *
   * @var array
   */
  public static $testViews = array('test_group_rows', 'test_ungroup_rows');

  /**
   * Modules to enable.
   *
   * @var array
   */
  public static $modules = array('node', 'field_test');

  /**
   * Field that will be created to test the group/ungroup rows functionality
   *
   * @var string
   */
  private $fieldName = 'field_group_rows';

  protected function setUp() {
    parent::setUp();

    // Create content type with unlimited text field.
    $node_type = $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));

    // Create the unlimited text field.
    $field_storage = entity_create('field_storage_config', array(
        'field_name' => $this->fieldName,
        'entity_type' => 'node',
        'type' => 'text',
        'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED,
      ));
    $field_storage->save();

    // Create an instance of the text field on the content type.
    $field = array(
      'field_storage' => $field_storage,
      'bundle' => $node_type->id(),
    );
    entity_create('field_config', $field)->save();
  }

  /**
   * Testing the "Grouped rows" functionality.
   */
  public function testGroupRows() {
    $edit = array(
      'title' => $this->randomMachineName(),
      $this->fieldName => array('a', 'b', 'c'),
    );
    $this->drupalCreateNode($edit);

    $view = Views::getView('test_group_rows');

    // Test grouped rows.
    $this->executeView($view);
    $this->assertEqual($view->field[$this->fieldName]->advancedRender($view->result[0]), 'a, b, c');

    // Change the group_rows checkbox to false.
    $view = Views::getView('test_group_rows');
    $view->setHandlerOption('default', 'field', $this->fieldName, 'group_rows', FALSE);

    // Test ungrouped rows.
    $this->executeView($view);
    $this->assertEqual($view->field[$this->fieldName]->advancedRender($view->result[0]), 'a');
    $this->assertEqual($view->field[$this->fieldName]->advancedRender($view->result[1]), 'b');
    $this->assertEqual($view->field[$this->fieldName]->advancedRender($view->result[2]), 'c');
  }

}

redpajama_set_name: RedPajamaGithub


text:
<?php

declare(strict_types=1);

namespace App\Controller\Api\Admin\Backups;

use App\Controller\Api\Traits\HasLogViewer;
use App\Http\Response;
use App\Http\ServerRequest;
use App\Utilities\File;
use Psr\Http\Message\ResponseInterface;

class GetLogAction
{
    use HasLogViewer;

    public function __invoke(
        ServerRequest $request,
        Response $response,
        string $path
    ): ResponseInterface {
        $logPath = File::validateTempPath($path);

        return $this->streamLogToResponse($request, $response, $logPath, true);
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.Pkcs;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading;
using System.Web;

using ASC.FederatedLogin.Helpers;
using ASC.FederatedLogin.Profile;

using JWT;
using JWT.Algorithms;
using JWT.Builder;
using JWT.Serializers;

using Newtonsoft.Json.Linq;

namespace ASC.FederatedLogin.LoginProviders
{
    public class GosUslugiLoginProvider : BaseLoginProvider<GosUslugiLoginProvider>
    {
        public string BaseDomain
        {
            get { return this["gosUslugiDomain"]; }
        }

        public override string CodeUrl
        {
            get { return BaseDomain + "/aas/oauth2/ac"; }
        }

        public override string AccessTokenUrl
        {
            get { return BaseDomain + "/aas/oauth2/te"; }
        }

        public override string ClientID
        {
            get { return this["gosUslugiClientId"]; }
        }

        public override string ClientSecret
        {
            get { return this["gosUslugiCert"]; }
        }

        public override string RedirectUri
        {
            get { return this["gosUslugiRedirectUrl"]; }
        }

        public override string Scopes
        {
            get { return "fullname birthdate gender email"; }
        }

        private string GosUslugiProfileUrl
        {
            get { return BaseDomain + "/rs/prns/"; }
        }

        public GosUslugiLoginProvider()
        {
        }

        public GosUslugiLoginProvider(string name, int order, Dictionary<string, string> props, Dictionary<string, string> additional = null)
            : base(name, order, props, additional)
        {
        }

        public override LoginProfile ProcessAuthoriztion(HttpContext context, IDictionary<string, string> @params)
        {
            try
            {
                var token = Auth(context, Scopes);

                if (token == null)
                {
                    throw new Exception("Login failed");
                }

                return GetLoginProfile(token.AccessToken);
            }
            catch (ThreadAbortException)
            {
                throw;
            }
            catch (Exception ex)
            {
                return LoginProfile.FromError(ex);
            }
        }

        protected override OAuth20Token Auth(HttpContext context, string scopes, Dictionary<string, string> additionalArgs = null)
        {
            var error = context.Request["error"];
            if (!string.IsNullOrEmpty(error))
            {
                if (error == "access_denied")
                {
                    error = "Canceled at provider";
                }
                throw new Exception(error);
            }

            var code = context.Request["code"];
            if (string.IsNullOrEmpty(code))
            {
                RequestCode(HttpContext.Current, scopes);
                return null;
            }
            var state = context.Request["state"];
            return GetAccessToken(state, code);
        }

        private void RequestCode(HttpContext context, string scope = null)
        {
            var timestamp = DateTime.UtcNow.ToString("yyyy.MM.dd HH:mm:ss +0000");
            var state = Guid.NewGuid().ToString();//HttpContext.Current.Request.GetUrlRewriter().AbsoluteUri;

            var msg = scope + timestamp + ClientID + state;
            var encodedSignature = SignMsg(msg);
            var clientSecret = HttpServerUtility.UrlTokenEncode(encodedSignature);

            var requestParams = new Dictionary<string, string>
                {
                    { "client_id", ClientID },
                    { "client_secret", clientSecret },
                    { "redirect_uri", RedirectUri },
                    { "scope", scope },
                    { "response_type", "code" },
                    { "state", state },
                    { "timestamp", timestamp },
                    { "access_type", "online" },
                    { "display", "popup" }
                };
            var requestQuery = string.Join("&", requestParams.Select(pair => pair.Key + "=" + HttpUtility.UrlEncode(pair.Value)));//.Replace("+", "%2b");

            var redURL = CodeUrl + "?" + requestQuery;
            context.Response.Redirect(redURL, true);
        }

        private OAuth20Token GetAccessToken(string state, string code)
        {
            var timestamp = DateTime.UtcNow.ToString("yyyy.MM.dd HH:mm:ss +0000");

            var msg = Scopes + timestamp + ClientID + state;
            var encodedSignature = SignMsg(msg);
            var clientSecret = HttpServerUtility.UrlTokenEncode(encodedSignature);

            var requestParams = new Dictionary<string, string>
                {
                    { "client_id", ClientID },
                    { "code", code },
                    { "grant_type", "authorization_code" },
                    { "client_secret", clientSecret },
                    { "state", state },
                    { "redirect_uri", RedirectUri },
                    { "scope", Scopes },
                    { "timestamp", timestamp },
                    { "token_type", "Bearer" }
                };
            var requestQuery = string.Join("&", requestParams.Select(pair => pair.Key + "=" + HttpUtility.UrlEncode(pair.Value)));

            var result = RequestHelper.PerformRequest(AccessTokenUrl, "application/x-www-form-urlencoded", "POST", requestQuery);

            return OAuth20Token.FromJson(result);
        }

        public override LoginProfile GetLoginProfile(string accessToken)
        {
            var tokenPayloadString = JwtBuilder.Create()
                                    .WithAlgorithm(new HMACSHA256Algorithm())
                                    .Decode(accessToken);

            var tokenPayload = JObject.Parse(tokenPayloadString);
            if (tokenPayload == null)
            {
                throw new Exception("Payload is incorrect");
            }
            var oid = tokenPayload.Value<string>("urn:esia:sbj_id");

            var userInfoString = RequestHelper.PerformRequest(GosUslugiProfileUrl + oid, "application/x-www-form-urlencoded", headers: new Dictionary<string, string> { { "Authorization", "Bearer " + accessToken } });
            var userInfo = JObject.Parse(userInfoString);
            if (userInfo == null)
            {
                throw new Exception("userinfo is incorrect");
            }

            var profile = new LoginProfile
            {
                Id = oid,
                FirstName = userInfo.Value<string>("firstName"),
                LastName = userInfo.Value<string>("lastName"),

                Provider = ProviderConstants.GosUslugi,
            };

            var userContactsString = RequestHelper.PerformRequest(GosUslugiProfileUrl + oid + "/ctts", "application/x-www-form-urlencoded", headers: new Dictionary<string, string> { { "Authorization", "Bearer " + accessToken } });
            var userContacts = JObject.Parse(userContactsString);
            if (userContacts == null)
            {
                throw new Exception("usercontacts is incorrect");
            }

            var contactElements = userContacts.Value<JArray>("elements");
            if (contactElements == null)
            {
                throw new Exception("usercontacts elements is incorrect");
            }

            foreach (var contactElement in contactElements.ToObject<List<string>>())
            {
                var userContactString = RequestHelper.PerformRequest(contactElement, "application/x-www-form-urlencoded", headers: new Dictionary<string, string> { { "Authorization", "Bearer " + accessToken } });

                var userContact = JObject.Parse(userContactString);
                if (userContact == null)
                {
                    throw new Exception("usercontacts is incorrect");
                }

                var type = userContact.Value<string>("type");
                if (type != "EML") continue;

                profile.EMail = userContact.Value<string>("value");
                break;
            }

            return profile;
        }

        private X509Certificate2 GetSignerCert()
        {
            var storeMy = new X509Store(StoreName.Root, StoreLocation.LocalMachine);
            storeMy.Open(OpenFlags.ReadOnly);
            var certColl = storeMy.Certificates.Find(X509FindType.FindBySubjectKeyIdentifier, ClientSecret, false);
            storeMy.Close();
            if (certColl.Count == 0)
            {
                throw new Exception("Certificate not found");
            }
            return certColl[0];
        }

        private byte[] SignMsg(string msg)
        {
            var signerCert = GetSignerCert();

            var msgBytes = Encoding.UTF8.GetBytes(msg);
            var contentInfo = new ContentInfo(msgBytes);
            var signedCms = new SignedCms(contentInfo, true);
            var cmsSigner = new CmsSigner(signerCert);
            signedCms.ComputeSignature(cmsSigner);
            return signedCms.Encode();
        }

        //private static bool VerifyMsg(Byte[] msg, byte[] encodedSignature)
        //{
        //    ContentInfo contentInfo = new ContentInfo(msg);
        //    SignedCms signedCms = new SignedCms(contentInfo, true);
        //    signedCms.Decode(encodedSignature);

        //    try
        //    {
        //        signedCms.CheckSignature(true);
        //    }
        //    catch (System.Security.Cryptography.CryptographicException e)
        //    {
        //        return false;
        //    }

        //    return true;
        //}
    }
}


text:
function testSetNewPropertiesOnUnextensibleObjects() {
    var fixed = {};
    Object.preventExtensions(fixed);
    fixed.newProp = "ohai";

    console.log(fixed.newProp);
}
// No error: Logs undefined
testSetNewPropertiesOnUnextensibleObjects();


text:
using System.Collections;
using System.Collections.Generic;

namespace ArmyAnt.Algorithm
{

    public class LinkedTree<T_Tag, T_Val> : ITree<T_Tag, T_Val>
    {
        // 实现接口
        public LinkedTree(T_Tag tag, T_Val val, LinkedTree<T_Tag, T_Val> parent)
        {
            Value = val;
            if (parent != null)
            {
                parent[tag] = this;
            }
            else
            {
                Tag = tag;
            }
            IsCheckTag = false;
        }

        public ITree<T_Tag, T_Val> this[T_Tag tag]
        {
            get
            {
                return children[tag];
            }
            set
            {
                if (value.GetType() != typeof(LinkedTree<T_Tag, T_Val>))
                    throw new System.ArgumentException("The child of the tree you are setting is not a linked tree!", "tag");
                children[tag] = ToLinkedTree(value);
                children[tag].parent = this;
                children[tag].Tag = tag;
                if (!CheckTreeRef(children[tag], true))
                {
                    throw new System.ArgumentException("The parent has a node as this as its parent or one of grand parents !");
                }
            }
        }

        public T_Tag Tag { get; set; }

        public T_Val Value { get; set; }

        public int ChildrenCount { get { return children.Count; } }
        public string Json
        {
            get
            {
                string ret = "{";
                foreach (var elem in children)
                {
                    ret += '"' + elem.Key.ToString() + '"' + ':' + elem.Value.ToString() + ',';
                }
                ret.Trim(',');
                return ret + '}';
            }
        }
        public override string ToString()
        {
            return Json;
        }

        public ETreeTraversalWay EnumeratorType { get; set; }

        public bool AddChild(T_Tag tag, T_Val value)
        {
            if (IsCheckTag && (GetRoot().Tag.Equals(tag) || GetRoot().GetChildInTree(tag) != null))
                return false;
            if (children.ContainsKey(tag))
                return false;
            new LinkedTree<T_Tag, T_Val>(tag, value, this);
            return true;
        }

        public void ClearChildren()
        {
            foreach (var elem in children)
            {
                elem.Value.parent = null;
            }
            children.Clear();
        }

        public ITree<T_Tag, T_Val> GetChild(T_Tag tag)
        {
            return children[tag];
        }

        public ITree<T_Tag, T_Val> GetChildInTree(T_Tag tag)
        {
            var ret = GetChild(tag);
            if (ret == null)
            {
                var childrens = GetChildren();
                if (childrens == null)
                    return null;
                foreach (var elem in childrens)
                {
                    var finded = GetChildInTree(tag);
                    if (finded != null)
                        return finded;
                }
            }
            return ret;
        }

        public ITree<T_Tag, T_Val>[] GetChildren()
        {
            if (children.Count == 0)
                return null;
            var ret = new ITree<T_Tag, T_Val>[children.Count];
            var index = 0;
            foreach (var elem in children)
            {
                ret[index++] = elem.Value;
            }
            return ret;
        }

        public IEnumerator<ITree<T_Tag, T_Val>> GetEnumerator()
        {
            return GetEnumerator(EnumeratorType);
        }

        public bool RemoveChild(T_Tag tag)
        {
            var target = children[tag];
            if (target != null)
                target.parent = null;
            return children.Remove(tag);
        }

        public bool RemoveChildInTree(T_Tag tag)
        {
            var ret = RemoveChild(tag);
            if (!ret)
            {
                var childrens = GetChildren();
                if (childrens == null)
                    return false;
                foreach (var elem in childrens)
                {
                    var finded = RemoveChildInTree(tag);
                    if (finded)
                        return true;
                }
            }
            return ret;
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        public ITree<T_Tag, T_Val> GetParent()
        {
            return parent;
        }

        public ITree<T_Tag, T_Val> GetRoot()
        {
            var ret = this;
            while (ret.parent != null)
                ret = ret.parent;
            return ret;
        }

        // 自带方法
        public bool IsCheckTag { get; set; }

        public bool AddChild(LinkedTree<T_Tag, T_Val> tree)
        {
            if (IsCheckTag && (GetRoot().Tag.Equals(tree.Tag) || GetRoot().GetChildInTree(tree.Tag) != null))
                return false;
            if (children.ContainsKey(tree.Tag))
                return false;
            this[tree.Tag] = tree;
            return true;
        }

        public IEnumerator<ITree<T_Tag, T_Val>> GetEnumerator(ETreeTraversalWay type)
        {

            if (type == ETreeTraversalWay.Unknown)
                type = EnumeratorType;
            switch (type)
            {   // TODO : 需要完善迭代器生成算法, 但目前暂不需要
                case ETreeTraversalWay.ChildrenOnly:
                    foreach (var item in children)
                    {
                        yield return item.Value;
                    }
                    break;
                case ETreeTraversalWay.LeavesOnly:
                    {
                        if (ChildrenCount <= 0)
                        {
                            yield return this;
                        }
                        else
                        {
                            var current = this;     // 要输出的迭代器成员
                            Stack<Dictionary<T_Tag, LinkedTree<T_Tag, T_Val>>.Enumerator> targetCurr = new Stack<Dictionary<T_Tag, LinkedTree<T_Tag, T_Val>>.Enumerator>();
                            do
                            {
                                // 寻找到下一个后, 查询是否有子节点, 若有, 则转移为子节点, 若无则证明是叶子节点, 为遍历目标
                                for (var enumerator = current.children.GetEnumerator(); current.ChildrenCount > 0; enumerator = current.children.GetEnumerator())
                                {
                                    enumerator.MoveNext();
                                    targetCurr.Push(enumerator);
                                    current = enumerator.Current.Value;
                                }
                                yield return current;
                                // 前往下一个, 若无下一个, 则返回到父节点的下一个, 若父节点也无,则继续寻找父节点
                                var currEnum = targetCurr.Pop();
                                var ret = currEnum.MoveNext();
                                while (!ret)
                                {
                                    // 若上一步一直追溯到根节点也没有下一个, 则证明已遍历完毕
                                    if (targetCurr.Count > 0)
                                    {
                                        currEnum = targetCurr.Pop();
                                        ret = currEnum.MoveNext();
                                    }
                                    else
                                    {
                                        break;
                                    }
                                }
                                if (ret)
                                {
                                    targetCurr.Push(currEnum);
                                }
                            } while (targetCurr.Count > 0);
                        }
                    }
                    break;
                case ETreeTraversalWay.RandomTraversal:
                    break;
                case ETreeTraversalWay.LayerorderTraversal:
                    break;
                case ETreeTraversalWay.PreorderTraversal:
                    break;
                case ETreeTraversalWay.PostorderTraversal:
                    break;
            }
        }

        public static LinkedTree<T_Tag, T_Val> ToLinkedTree(ITree<T_Tag, T_Val> value)
        {
            if (value.GetType() != typeof(LinkedTree<T_Tag, T_Val>))
                return null;
            return (LinkedTree<T_Tag, T_Val>)value;
        }

        public int GetBranchDepth()
        {
            int ret = 0;
            foreach (var elem in children)
            {
                var elemDepth = elem.Value.GetBranchDepth();
                if (ret < elemDepth)
                    ret = elemDepth;
            }
            return 1 + ret;
        }

        public int GetDepthInRoot()
        {
            int ret = 1;
            var roadParent = parent;
            while (roadParent != null)
            {
                ret++;
                roadParent = roadParent.parent;
            }
            return ret;
        }

        public ITree<T_Tag, T_Val>[] GetBranchRoad()
        {
            var list = new Stack<ITree<T_Tag, T_Val>>();
            list.Push(this);
            var roadParent = parent;
            while (roadParent != null)
            {
                list.Push(roadParent);
                roadParent = roadParent.parent;
            }
            var ret = new ITree<T_Tag, T_Val>[list.Count];
            var index = 0;
            while (list.Count > 0)
            {
                ret[index++] = list.Pop();
            }
            return ret;
        }

        /// <summary>
        ///     检查树的节点是否有重复
        /// </summary>
        /// <param name="node"> 如果输入此参数且不为null, 则仅检查树中是否有与此节点重复的节点 </param>
        /// <param name="parentOnly"> 如果输入此参数且为true, 则仅检查该节点的父节点序列中是否有该节点自己 </param>
        /// <returns> 无重复返回true </returns>
        public bool CheckTreeRef(LinkedTree<T_Tag, T_Val> node = null, bool parentOnly = false)
        {
            if (parentOnly)
            {
                if (node != null)
                {
                    var p = node.parent;
                    while (p != null)
                    {
                        if (p == node)
                        {
                            return false;
                        }
                        p = p.parent;
                    }
                    return true;
                }
                else
                {
                    // TODO 没有指定节点, 检测整个树是否有父子重复
                    return false;
                }
            }
            else
            {
                if (node != null)
                {
                    // TODO 检测整个树是否有与此重复的节点
                    return false;
                }
                else
                {
                    // TODO 检测整个树是否有任意节点之间互相重复
                    return false;
                }
            }
        }

        // 成员
        private LinkedTree<T_Tag, T_Val> parent = null;
        private Dictionary<T_Tag, LinkedTree<T_Tag, T_Val>> children = new Dictionary<T_Tag, LinkedTree<T_Tag, T_Val>>();
    }

}


text:
<?php

$languageStrings = Array(
	'ModuleName' => 'Module Name',
	'SINGLE_ModuleName' => 'Module Name',
	'ModuleName ID' => 'Module Name ID',

	'LBL_CUSTOM_INFORMATION' => 'Custom Information',
	'LBL_MODULEBLOCK_INFORMATION' => 'ModuleBlock Information',

	'ModuleFieldLabel' => 'ModuleFieldLabel Text',
);

?>


text:
<?php

use yii\helpers\Html;
use yii\widgets\ListView;

/* @var $this yii\web\View */
/* @var $searchModel app\models\FilmographySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Ruslan Akun | Filmography';
?>

    <?= ListView::widget([
        'dataProvider' => $dataProvider,
        'itemOptions' => ['class' => 'thumb-wrap'],
        'emptyText' => Yii::t('app', 'No results found'),
        'options' => [
            'tag' => 'div',
            'class' => 'container',
        ],
        'layout' => "{items}",
        'itemView' => function ($model, $key, $index, $widget) {
            if($index==0) $active='thumb-active'; else $active='';
            return "
".Html::img("@web/uploads/images/small/s_".$model->image, ['alt'=>'', 'style'=>'color:inherit;'])."
";
        },
    ]) ?>

    <?= ListView::widget([
        'dataProvider' => $dataProvider,
        'itemOptions' => ['class' => 'film-item'],
        'emptyText' => Yii::t('app', 'No results found'),
        'options' => [
            'tag' => 'div',
            'class' => 'list-wrapper',
        ],
        'layout' => "{items}",
        'itemView' => function ($model, $key, $index, $widget) {
            return $this->render('_list_item',['model' => $model,'key'=>$key]);

            // or just do some echo
            // return $model->title . ' posted by ' . $model->author;
        },
    ]) ?>


text:
using System;
using System.IO;
using NUnit.Framework;

namespace ValveKeyValue.Test
{
    class TruncatedDataTestCase
    {
        [Test]
        public void WhileReadingEmptyData()
        {
            var data = Array.Empty<byte>();

            Assert.That(
                () => serializer.Deserialize(data),
                Throws.Exception.InstanceOf<KeyValueException>().With.InnerException.TypeOf<EndOfStreamException>());
        }

        [Test]
        public void WhileReadingObject()
        {
            var data = new byte[]
            {
                0x00,
            };

            Assert.That(
                () => serializer.Deserialize(data),
                Throws.Exception.InstanceOf<KeyValueException>().With.InnerException.TypeOf<EndOfStreamException>());
        }

        [Test]
        public void WhileReadingObjectName()
        {
            var data = new byte[]
            {
                0x00,
                    0x54, 0x65, 0x73, 0x74, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74
            };

            Assert.That(
                () => serializer.Deserialize(data),
                Throws.Exception.InstanceOf<KeyValueException>().With.InnerException.TypeOf<EndOfStreamException>());
        }

        [Test]
        public void WhileReadingValueType()
        {
            var data = new byte[]
            {
                0x00,
                    0x54, 0x65, 0x73, 0x74, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00,
            };

            Assert.That(
                () => serializer.Deserialize(data),
                Throws.Exception.InstanceOf<KeyValueException>().With.InnerException.TypeOf<EndOfStreamException>());
        }

        [Test]
        public void WhileReadingValueName()
        {
            var data = new byte[]
            {
                0x00,
                    0x54, 0x65, 0x73, 0x74, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00,
                    0x02,
                        0x6B, 0x65, 0x79
            };

            Assert.That(
                () => serializer.Deserialize(data),
                Throws.Exception.InstanceOf<KeyValueException>().With.InnerException.TypeOf<EndOfStreamException>());
        }

        [Test]
        public void WhileReadingValue()
        {
            var data = new byte[]
            {
                0x00,
                    0x54, 0x65, 0x73, 0x74, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00,
                    0x02,
                        0x6B, 0x65, 0x79, 0x00,
                        0x01
            };

            Assert.That(
                () => serializer.Deserialize(data),
                Throws.Exception.InstanceOf<KeyValueException>().With.InnerException.TypeOf<EndOfStreamException>());
        }

        KVSerializer serializer;

        [OneTimeSetUp]
        public void SetUpSerializer()
        {
            serializer = KVSerializer.Create(KVSerializationFormat.KeyValues1Binary);
        }
    }
}


text:
Xktta.afterInit.push(function(){

  Xktta.defineProperties(Number.prototype, {
    localize: {
      value: function (options) {
        return this.l(options);
      }
    },
    l: {
      value: function (options) {
        return I18n.l(this, options);
      }
    },
  });

});


text:
<!doctype html>
<title>360 Life Stream - Stitching and Streaming GUI</title>

<body>
This is the command line interface driver.
 <p>{{ cli_driver() }}</p>
</body>


text:
#!/usr/bin/perl -w
#
# Copyright (C) 2009 Adam Dingle <adam@yorba.org>
#
# This file is part of WebKit
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public License
# aint with this library; see the file COPYING.LIB.  If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#

my $classlist = <STDIN>;
chomp($classlist);
my @classes = split / /, $classlist;
@classes = sort @classes;

print <<EOF;
/* This file is part of the WebKit open source project.
   This file has been generated by gobject-generate-headers.pl.  DO NOT MODIFY!

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

EOF

my $outType = $ARGV[0];
my $header;
if ($outType eq "defines") {
    $header = "webkitdomdefines_h";
} elsif ($outType eq "gdom") {
    $header = "webkitdom_h";
} else {
    die "unknown output type";
}

print "#ifndef ${header}\n";
print "#define ${header}\n";
print "\n";

if ($outType eq "defines") {
    foreach my $class (@classes) {
        print "typedef struct _WebKitDOM${class} WebKitDOM${class};\n";
        print "typedef struct _WebKitDOM${class}Class WebKitDOM${class}Class;\n";
        print "\n";
    }
} elsif ($outType eq "gdom") {
    foreach my $class (@classes) {
        print "#include <webkit/WebKitDOM${class}.h>\n";
    }
}

print "\n";
print "#endif\n";


text:
class WeakRef

  class RefError < RuntimeError; end

  def self.create_weakref(obj)
    Ruby.primitive :make_weak_ref
    raise PrimitiveFailure, "unable to make weak reference"
  end

  def initialize(object)
    @wr = self.class.create_weakref(object)
  end

  def inspect
    "#<WeakRef:0x#{object_id.to_s(16)} object=#{@wr.at(0).inspect}>"
  end

  def weakref_alive?
    !@wr.at(0).nil?
  end

  def object
    obj = @wr.at(0)
    raise RefError, "Object has been collected as garbage" unless obj
    return obj
  end

end


text:
import {mixpanelToken} from '../config';

export async function loadMixpanel() {
  const {default: mixpanel} = await import(
    /* webpackChunkName: "mainAsync" */
    'mixpanel-browser'
  );
  return mixpanel;
}
export async function initMixpanel() {
  const mixpanel = await loadMixpanel();
  mixpanel.init(mixpanelToken);
}


text:
@interface AppModel : NSObject

@property float taxRate;
@property (strong, nonatomic) NSMutableArray *lists;
@property (strong, nonatomic) NSMutableArray *friends;
@property GTLPlusPerson *me;

+(id) sharedAppModel;

-(BOOL) createNewList: (NSString *)listName;

-(void) removeListWithName: (NSString *)listName;

-(NSArray *) listsThisPayerShowUp: (NSString *)payerName;

-(BOOL) addItem:(NSString *)itemName ofQuantity:(int)quantity withPrice:(float)pricePerUnit withItemImgURL:(NSString *)itemImgURL toList:(NSString *)listName;

-(void) removeItem:(NSString *)itemName fromList:(NSString *)listName;

-(BOOL) addPayer:(NSString *)payerName toList:(NSString *)listName;

-(void) removePayer:(NSString *)payerName toList:(NSString *)listName;

-(float) getTotalPriceFromList:(NSString *)listName;

-(int) getNumOfItemsFromList:(NSString *)listName;

-(int) getNumOfPayersFromList:(NSString *)listName;

-(void) setFriendImgURL:(NSString *)imgURL forFriendWithName:(NSString *)friendName;

@end


text:
module PushbulletRuby
  module API
    module Devices
      def devices
        PushbulletRuby::Device.from_responce(get('/v2/devices'))
      end

      def update_device(device_id: nil, params: {})
        PushbulletRuby::Device.new(post("/v2/devices/#{device_id}", params).body)
      end

      def create_device(params: {})
        PushbulletRuby::Device.new(post('/v2/devices', params).body)
      end

      def delete_device(device_id: nil)
        delete("/v2/devices/#{device_id}").body
      end
    end
  end
end