caseblocks_api 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/caseblocks_api.gemspec +1 -1
- data/lib/caseblocks_api.rb +6 -2
- data/spec/caseblocks_api_spec.rb +1 -1
- metadata +2 -2
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.2. | 
| 1 | 
            +
            0.2.5
         | 
    
        data/caseblocks_api.gemspec
    CHANGED
    
    
    
        data/lib/caseblocks_api.rb
    CHANGED
    
    | @@ -40,8 +40,12 @@ module CaseblocksAPI | |
| 40 40 |  | 
| 41 41 | 
             
                  def find_case_type_by_name(case_type_name)
         | 
| 42 42 | 
             
                    @case_types = self.class.get("/case_blocks/case_types")["case_types"]
         | 
| 43 | 
            -
                     | 
| 44 | 
            -
             | 
| 43 | 
            +
                    @case_types.each do |case_type|
         | 
| 44 | 
            +
                      if case_type["name"] == case_type_name
         | 
| 45 | 
            +
                        return case_type["id"]
         | 
| 46 | 
            +
                      end
         | 
| 47 | 
            +
                    end
         | 
| 48 | 
            +
                    nil
         | 
| 45 49 | 
             
                  end
         | 
| 46 50 |  | 
| 47 51 | 
             
                  def case_types
         | 
    
        data/spec/caseblocks_api_spec.rb
    CHANGED
    
    | @@ -25,7 +25,7 @@ describe "CaseblocksAPI" do | |
| 25 25 |  | 
| 26 26 | 
             
                it "should look for the case type id" do
         | 
| 27 27 | 
             
                  stub_request(:post, "http://example.com/tokens?auth_token=some_token")
         | 
| 28 | 
            -
                  CaseblocksAPI::Client.stub(:get).and_return({"case_types" => [ { | 
| 28 | 
            +
                  CaseblocksAPI::Client.stub(:get).and_return({"case_types" => [ {"id" => 1, "name" => 'some_case'} ]})
         | 
| 29 29 | 
             
                  stub = stub_request(:post, "example.com/case_blocks/cases?auth_token=")
         | 
| 30 30 | 
             
                    .with({body: { 'case' => {'my' => 'params', 'case_type_id' => 1}}.to_json })
         | 
| 31 31 | 
             
                  caseblocks_client.create_case({'my' => 'params'}, 'some_case')
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: caseblocks_api
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.2. | 
| 4 | 
            +
              version: 0.2.5
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -215,7 +215,7 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 215 215 | 
             
                  version: '0'
         | 
| 216 216 | 
             
                  segments:
         | 
| 217 217 | 
             
                  - 0
         | 
| 218 | 
            -
                  hash:  | 
| 218 | 
            +
                  hash: -3653200939008105340
         | 
| 219 219 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 220 220 | 
             
              none: false
         | 
| 221 221 | 
             
              requirements:
         |