ezapi 0.1.0 → 0.2.0

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -15
  3. data/ezapi.gemspec +1 -1
  4. data/lib/ezapi/version.rb +1 -1
  5. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9f560c99144dec1335c0fff65c18ab7b8d2e45a
4
- data.tar.gz: 4a745539e16f2d9f0ca262debc00422474204029
3
+ metadata.gz: 50d92c7fadbcb5901d03f74300d84e53af90b943
4
+ data.tar.gz: c1d204018d5bd23b24b50a94eb6610a8387ca4b4
5
5
  SHA512:
6
- metadata.gz: 1d08ba48dc7f31f0b568e0bbb0dab02e1491fe02d07c0052b0b928b69d2b6dd7bf94eddf022d6c5f4702f428ce557fbc24cd03149fbc3d560a27d1ca4509f6b2
7
- data.tar.gz: 1afd0a7847788a23b57ec3d9744b983d39370069ed0a81270fb870118387a9d7d7323005e9a2de1ff22a6cd81d5788cb10bf7fb8149fda3af92db3f7082554f6
6
+ metadata.gz: 29058fea6d0929f9bce037dcbb4cf9e57161076c546126fc53c5ae5c069a07aad37b65f0e9f877a09d74c0677ba44c01ae4ea43eab1f52920c65d3be13f099f6
7
+ data.tar.gz: 63d2079d9b04f9ba2558d0e006b04d23cb04da89b6277dde07f7c26026b54a9cdae429cd1bdfe443d0003fd07241c5fa1601d2a0a938987b0d3333979c22b9d6
data/README.md CHANGED
@@ -48,23 +48,17 @@ There are two ways of adding custom actions that are not in the included rest
48
48
  ```ruby
49
49
  module ThirdPartyApp
50
50
  class User < EZApi::ObjectBase
51
-
52
51
  # For class methods
53
- module ClassMethods
54
- def custom_action
55
- response = client.get("#{api_path}/custom_action")
56
- # Do whatever you want with the response
57
- end
58
- end
59
-
60
- def self.included(base)
61
- base.extend(ClassMethods)
62
- end
52
+ def self.custom_action
53
+ response = client.get("#{api_path}/custom_action")
54
+ # Do whatever you want with the response
55
+ end
63
56
 
64
- def custom_instance_action
65
- response = self.class.client.get("#{self.class.api_path}/custom_action")
66
- # Do whatever you want with the response
67
- end
57
+ # for instance methods
58
+ def custom_instance_action
59
+ response = self.class.client.get("#{self.class.api_path}/custom_action")
60
+ # Do whatever you want with the response
61
+ end
68
62
  end
69
63
  end
70
64
 
@@ -79,9 +73,21 @@ ThirdPartyApp::User.new.custom_instance_action
79
73
  module ThirdPartyApp
80
74
  module Actions
81
75
  module MyCustomAction
76
+ # For instance methods
82
77
  def my_custom_action
83
78
  # Do Something
84
79
  end
80
+
81
+ # For class methods
82
+ module ClassMethods
83
+ def my_custom_class_action
84
+ # do something
85
+ end
86
+ end
87
+
88
+ def self.included(base)
89
+ base.extend(ClassMethods)
90
+ end
85
91
  end
86
92
  end
87
93
  end
data/ezapi.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
- spec.add_dependency 'rest-client', '~> 1.8'
32
+ spec.add_dependency 'rest-client', '~> 2.0'
33
33
  spec.add_dependency 'activesupport', '>= 4.2'
34
34
  spec.add_development_dependency "bundler", "~> 1.16"
35
35
  spec.add_development_dependency "rake", "~> 10.0"
data/lib/ezapi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module EZApi
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-11 00:00:00.000000000 Z
11
+ date: 2018-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.8'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.8'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement