clickmeetings 0.1.3.4 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 482fde33d57ea4332656c8d76c5d74c7321967d4
4
- data.tar.gz: 5eee9f1414e7ca5cc15ffa4bcf829cae43e22b23
3
+ metadata.gz: 3c6dc86356e5371ae714c4ccdfa1b6da535c8392
4
+ data.tar.gz: 0ba188ae455975bf735040758d5e2f065f59bf99
5
5
  SHA512:
6
- metadata.gz: 91cc1c0c67c53f89565b4357a557b45650ca62c8e7c5988fdc28373ed9dad562648a40c8f64c4fac0c520f75005f39cf7c323e7dcc999d771e76c94e1f659cb1
7
- data.tar.gz: 41450fae3ca2c51a4d8b7700f0f855794054f9e947851c20acede4166b647f8cfcf0d8776c296c35c2d6c70922453cb8729e3b714139464071319faf24a5e3fc
6
+ metadata.gz: ce8baf7a35fc42529657d1acfbbc78416dc80f5f4e1dc35246389f8bf258fa12fb93521ed4a83b7cbd7b481601f2fbe2fd89842621c559afffec14d4fc9f7f6e
7
+ data.tar.gz: fa10dc0f39ff2565aa1f16233a5a3671450cb38962c1d3343be7b445e494d452c9818833caf5116fb4db0b22d019388f7518f124272c6e8ac4c044b022f9d49f
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency 'pry', "~> 0.10"
26
26
  spec.add_development_dependency 'simplecov'
27
27
  spec.add_development_dependency "simplecov-gem-profile"
28
+ spec.add_development_dependency "pry-byebug"
28
29
  spec.add_dependency "anyway_config", "~> 0", ">= 0.3"
29
30
  spec.add_dependency "faraday", "~> 0.9"
30
31
  spec.add_dependency "faraday_middleware", "~> 0.10"
@@ -7,7 +7,7 @@ module Clickmeetings
7
7
  include ActiveModel::Validations
8
8
 
9
9
  attr_accessor :id
10
-
10
+
11
11
  class << self
12
12
  attr_accessor :resource_name
13
13
  attr_reader :client_host, :client_api_key
@@ -15,7 +15,7 @@ module Clickmeetings
15
15
  delegate :remote_url, :remote_path, :handle_response, :client,
16
16
  :default_params, :default_headers, to: :new
17
17
  delegate :first, :last, to: :all
18
-
18
+
19
19
  def resource_name
20
20
  @resource_name ||= self.name.demodulize.pluralize.downcase
21
21
  end
@@ -99,10 +99,14 @@ module Clickmeetings
99
99
  when :destroy_all
100
100
  resource_name
101
101
  else
102
- "#{resource_name}/#{params[:id]}/#{action}"
102
+ action_path(action, params[:id])
103
103
  end
104
104
  end
105
105
 
106
+ def action_path(action, id)
107
+ id ? "#{resource_name}/#{id}/#{action}" : "#{resource_name}/#{action}"
108
+ end
109
+
106
110
  def default_params
107
111
  Hash.new
108
112
  end
@@ -1,3 +1,3 @@
1
1
  module Clickmeetings
2
- VERSION = "0.1.3.4"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -25,7 +25,6 @@ describe Clickmeetings::Client do
25
25
  'Accept'=>'*/*',
26
26
  'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
27
27
  'Content-Type'=>'application/x-www-form-urlencoded',
28
- 'User-Agent'=>'Faraday v0.9.2',
29
28
  'X-Api-Key'=>'qwer'
30
29
  })
31
30
  .to_return(status: 200, body: "{\"ping\":\"pong\"}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clickmeetings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.4
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergei Alekseenko
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-11-10 00:00:00.000000000 Z
12
+ date: 2018-10-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -109,6 +109,20 @@ dependencies:
109
109
  - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: pry-byebug
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
112
126
  - !ruby/object:Gem::Dependency
113
127
  name: anyway_config
114
128
  requirement: !ruby/object:Gem::Requirement