namely 0.1.0 → 0.2.1

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: a5bb34f16c66dc6a4c03d22c8001877df63c1596
4
- data.tar.gz: 6d524bf7b582e3400b69501d7f3c765b47471ab3
3
+ metadata.gz: 82e3b792bcc1b4e5bfc1f26c644a357330f362cd
4
+ data.tar.gz: 9a9a33361baa4da957dec3dec9d383ee30d9d551
5
5
  SHA512:
6
- metadata.gz: e4a363d03f16638af12ce7a2e375eb0e24f2cc6b479a97ec4c6363a455153f463fdabe13b0be46e340d6990ac24679356db22016f07c7b2e0bb33f6d1cbdba78
7
- data.tar.gz: b03735ea330318c229197c12135f6470d119e6178844afcae57e834d8873dd5daeacab625ee02e184d50f7f7181104959ba2470467430e4faec2cd0ff476cb30
6
+ metadata.gz: 6f46fa1212d1155b691c2107e0dbdb41decad9a83cff0562eea73366b6e33666dc19caaca98dd26744039823b123dc93f3b1c32c35aed4d582faaeb5f5f4a85c
7
+ data.tar.gz: 257d8b5ef131fdf6c2640eedab84723ce45a3d96c4713fb01ab9d0a4f9a37bad66f8d059f8daf0ae71d86f90e5651c05a2ef7634cd79bb805972fefb82ab014d
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  .env
2
2
  .yardoc
3
3
  doc
4
+ Gemfile.lock
@@ -0,0 +1,7 @@
1
+ TEST_ACCESS_TOKEN=<put generated access token here>
2
+ TEST_SUBDOMAIN=<put company subdomain here>
3
+ AUTH_CODE=just-an-auth-code
4
+ CLIENT_ID=client-id
5
+ CLIENT_SECRET=client-secret
6
+ CLIENT_REDIRECT_URI=localhost
7
+ TEST_REFRESH_TOKEN=refresh
data/README.md CHANGED
@@ -91,11 +91,13 @@ started:
91
91
 
92
92
  ### Setting up a development environment
93
93
 
94
- The Namely gem uses [dotenv] to manage environment variables. To run
95
- the tests you'll need to create a `.env` file in the project's root
96
- directory and assign a few variables in it.
94
+ After you have cloned this repo, run this setup script to set up your machine
95
+ with the necessary dependencies to run and test this app:
97
96
 
98
- Just take this example `.env` file and plug in appropriate values:
97
+ % ./bin/setup
98
+
99
+ The Namely gem uses [dotenv] to manage environment variables.
100
+ Visit the `.env` file and change a plug in appropriate values:
99
101
 
100
102
  ```
101
103
  TEST_ACCESS_TOKEN=my-sample-access-token
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env sh
2
+
3
+ # Run this script immediately after cloning the codebase.
4
+
5
+ # Exit if any subcommand fails
6
+ set -e
7
+
8
+ # Set up Ruby dependencies via Bundler
9
+ bundle install
10
+
11
+ # Set up configurable environment variables
12
+ if [ ! -f .env ]; then
13
+ cp .sample.env .env
14
+ fi
@@ -57,6 +57,13 @@ module Namely
57
57
  collection("job_tiers")
58
58
  end
59
59
 
60
+ # Return a Collection of job titles.
61
+ #
62
+ # @return [Collection]
63
+ def job_titles
64
+ collection("job_titles")
65
+ end
66
+
60
67
  # Return a Collection of profiles.
61
68
  #
62
69
  # @return [Collection]
@@ -1,3 +1,3 @@
1
1
  module Namely
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency "backports"
21
- spec.add_dependency "rest_client"
21
+ spec.add_dependency "rest-client"
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.7"
24
24
  spec.add_development_dependency "dotenv"
@@ -0,0 +1,101 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://<TEST_SUBDOMAIN>.namely.com/api/v1/job_titles?access_token=<TEST_ACCESS_TOKEN>&limit=all
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Cache-Control:
22
+ - max-age=0, private, must-revalidate
23
+ Content-Encoding:
24
+ - gzip
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Date:
28
+ - Fri, 17 Apr 2015 16:19:38 GMT
29
+ Server:
30
+ - nginx
31
+ Status:
32
+ - 200 OK
33
+ Strict-Transport-Security:
34
+ - max-age=31536000
35
+ - max-age=31536000; includeSubDomains;
36
+ Vary:
37
+ - Accept-Encoding
38
+ X-Rack-Cache:
39
+ - miss
40
+ X-Request-Id:
41
+ - 82ff99a7-1369-46ba-abd9-0a3ac5499669
42
+ X-Runtime:
43
+ - '0.076507'
44
+ Content-Length:
45
+ - '2154'
46
+ Connection:
47
+ - keep-alive
48
+ body:
49
+ encoding: ASCII-8BIT
50
+ string: !binary |-
51
+ H4sIAAAAAAAAA7VZa28cxxH8K4v7lACcZN7To2+KJCc2okgQ5dhAYgQzPT3M
52
+ WeSdcA/JgaD/nlqKxi1FnXUHrL+R1D5qu6urqkcfFj+v6392y921bBeP/vVh
53
+ sWyLR4vGoescSRkjTnl2XeUgpCRx0CWHxlQXF4vb23D5Y+b1frUbnv0ivN8t
54
+ 3wn+7Xq5eoMnfrh7vmxwXZeaurVdMUWtvPSgsrBTjlNtyaUWU198/Hhxh6JI
55
+ NFydqOyDAIUllbt41Yv3SWrsuccvoHheVuVKbgQ/Xspqud4MT5cb4d16cwQW
56
+ HuO4EKsaTAKszKrUmJS2jWqW7LjyBJZzzeZGVnGmrLz3WVFErXT2UTddQvZf
57
+ Ks4nWMcwnFmaFF0v0Rq8lFl53RMub6y08RLEsUnVTDG8Gv48PH45PN5u17ws
58
+ u5ka1CgkkYjCJYfLUwZNtDYqhV46WylN36vEfre+KbvlejVcPn32+giGkmLK
59
+ gtdnm63y4JrKMRc0h1vMrZSW0gSDNjXpTEFVlyIgW9yYjVVNa9ur0VSkTzD8
60
+ Zb9drmS7HZ7KO7lev72lyZP1etOWq3KcImcWhkl7C+qolNAZXzio4hzghR69
61
+ tdSNp6+B+m2+2FCo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E0H8dLG4kV0Zb77158UjTxeL7a7s
95
+ 9ngi5vbjg8cDxvZPhzd9WOz+93YE9uuftuO33d4kbQpqe/hPm5NGZ3pU0pbv
96
+ lm2P3P1kvdptlnU/Rt6DzZziSp/73afYfJiIU5z+8Ix/yK6vNze/HB5wUnCZ
97
+ rtifMutBJU9p2OH+Q446lOGUsH94wsManHTmNG3L3QnWwW1PWb4OD/hhvXmD
98
+ KmLFv83P40QfTOsUj7tvm5NKnGINxxxnbMpPHz/+Hw4OP4RvHAAA
99
+ http_version:
100
+ recorded_at: Fri, 17 Apr 2015 16:19:38 GMT
101
+ recorded_with: VCR 2.9.3
@@ -47,6 +47,12 @@ describe "integration tests" do
47
47
  it_behaves_like "a resource with an index action", [:title]
48
48
  end
49
49
 
50
+ describe "job title collections" do
51
+ subject { conn.job_titles }
52
+
53
+ it_behaves_like "a resource with an index action", [:title]
54
+ end
55
+
50
56
  describe "profile collections" do
51
57
  subject { conn.profiles }
52
58
 
metadata CHANGED
@@ -1,156 +1,158 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: namely
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Schwartz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-11 00:00:00.000000000 Z
11
+ date: 2015-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backports
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '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
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rest_client
28
+ name: rest-client
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.7'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.7'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: dotenv
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '10.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '10.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: vcr
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: webmock
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: yard
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - '>='
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - '>='
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  description:
140
140
  email:
141
141
  - harry@thoughtbot.com
142
- executables: []
142
+ executables:
143
+ - setup
143
144
  extensions: []
144
145
  extra_rdoc_files: []
145
146
  files:
146
- - ".gitignore"
147
- - ".travis.yml"
147
+ - .gitignore
148
+ - .sample.env
149
+ - .travis.yml
148
150
  - Gemfile
149
- - Gemfile.lock
150
151
  - LICENSE
151
152
  - LICENSE.txt
152
153
  - README.md
153
154
  - Rakefile
155
+ - bin/setup
154
156
  - lib/namely.rb
155
157
  - lib/namely/authenticator.rb
156
158
  - lib/namely/collection.rb
@@ -174,6 +176,7 @@ files:
174
176
  - spec/fixtures/vcr_cassettes/events_show_missing.yml
175
177
  - spec/fixtures/vcr_cassettes/fields_index.yml
176
178
  - spec/fixtures/vcr_cassettes/job_tiers_index.yml
179
+ - spec/fixtures/vcr_cassettes/job_titles_index.yml
177
180
  - spec/fixtures/vcr_cassettes/profiles/fields_index.yml
178
181
  - spec/fixtures/vcr_cassettes/profiles_create.yml
179
182
  - spec/fixtures/vcr_cassettes/profiles_create_failed.yml
@@ -210,17 +213,17 @@ require_paths:
210
213
  - lib
211
214
  required_ruby_version: !ruby/object:Gem::Requirement
212
215
  requirements:
213
- - - ">="
216
+ - - '>='
214
217
  - !ruby/object:Gem::Version
215
218
  version: '0'
216
219
  required_rubygems_version: !ruby/object:Gem::Requirement
217
220
  requirements:
218
- - - ">="
221
+ - - '>='
219
222
  - !ruby/object:Gem::Version
220
223
  version: '0'
221
224
  requirements: []
222
225
  rubyforge_project:
223
- rubygems_version: 2.2.2
226
+ rubygems_version: 2.0.14
224
227
  signing_key:
225
228
  specification_version: 4
226
229
  summary: Wraps the Namely HTTP API in lovely Ruby.
@@ -239,6 +242,7 @@ test_files:
239
242
  - spec/fixtures/vcr_cassettes/events_show_missing.yml
240
243
  - spec/fixtures/vcr_cassettes/fields_index.yml
241
244
  - spec/fixtures/vcr_cassettes/job_tiers_index.yml
245
+ - spec/fixtures/vcr_cassettes/job_titles_index.yml
242
246
  - spec/fixtures/vcr_cassettes/profiles/fields_index.yml
243
247
  - spec/fixtures/vcr_cassettes/profiles_create.yml
244
248
  - spec/fixtures/vcr_cassettes/profiles_create_failed.yml
@@ -1,51 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- namely (0.0.1)
5
- backports
6
- rest_client
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- addressable (2.3.6)
12
- backports (3.6.3)
13
- crack (0.4.2)
14
- safe_yaml (~> 1.0.0)
15
- diff-lcs (1.2.5)
16
- dotenv (1.0.2)
17
- netrc (0.7.9)
18
- rake (10.3.2)
19
- rest_client (1.8.1)
20
- netrc (~> 0.7.7)
21
- rspec (3.1.0)
22
- rspec-core (~> 3.1.0)
23
- rspec-expectations (~> 3.1.0)
24
- rspec-mocks (~> 3.1.0)
25
- rspec-core (3.1.7)
26
- rspec-support (~> 3.1.0)
27
- rspec-expectations (3.1.2)
28
- diff-lcs (>= 1.2.0, < 2.0)
29
- rspec-support (~> 3.1.0)
30
- rspec-mocks (3.1.3)
31
- rspec-support (~> 3.1.0)
32
- rspec-support (3.1.2)
33
- safe_yaml (1.0.4)
34
- vcr (2.9.3)
35
- webmock (1.8.7)
36
- addressable (>= 2.2.7)
37
- crack (>= 0.1.7)
38
- yard (0.8.7.6)
39
-
40
- PLATFORMS
41
- ruby
42
-
43
- DEPENDENCIES
44
- bundler (~> 1.7)
45
- dotenv
46
- namely!
47
- rake (~> 10.0)
48
- rspec
49
- vcr
50
- webmock
51
- yard