my_api_client 0.1.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c5d8b5551b8f2c0d0df45c2dcd16ca0c025c145def0612a1a68c1dc1f2868daf
4
+ data.tar.gz: ce24f92099206d025e9b81a3a48f69225c63d85055c8f118f1df193c43c5fd23
5
+ SHA512:
6
+ metadata.gz: d917e4f08cde15d4c645f0cfc4f6815993297171b7a0173bfd41b7e4403b26ceba11fd68f6ab05f9a224a2b74eb5ceeff78dd41baa52a76dbb3dd0cdbfa468f6
7
+ data.tar.gz: 15343ca8f75145d88ba5d7d4c68cedff7b187910c1aa7a1741291bf061ad50a0477aa8f6e163a826c68a9e93335bd54fe83ce9fbd8d2d9a054f06f287f27d2f8
@@ -0,0 +1,172 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version: 2
6
+
7
+ references:
8
+ - &download_cc_test_reporter
9
+ run:
10
+ name: Download cc-test-reporter
11
+ command: |
12
+ mkdir -p tmp/
13
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
14
+ chmod +x ./tmp/cc-test-reporter
15
+ - &restore_bundle_install_cache
16
+ restore_cache:
17
+ keys:
18
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
19
+ - v1-dependencies-
20
+ - &bundle_install
21
+ run:
22
+ name: Bundle Install
23
+ command: |
24
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
25
+ - &save_bundle_install_cache
26
+ save_cache:
27
+ paths:
28
+ - ./vendor/bundle
29
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
30
+ - &run_rspec
31
+ run:
32
+ name: Run Rspec
33
+ command: |
34
+ mkdir /tmp/test-results
35
+ TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
36
+ ./tmp/cc-test-reporter before-build
37
+ bundle exec rspec --format documentation \
38
+ --color \
39
+ --format RspecJunitFormatter \
40
+ --out /tmp/test-results/rspec.xml \
41
+ $TEST_FILES
42
+ ./tmp/cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
43
+ - &build
44
+ working_directory: ~/repo
45
+ steps:
46
+ - checkout
47
+ - *download_cc_test_reporter
48
+ - *restore_bundle_install_cache
49
+ - *bundle_install
50
+ - *save_bundle_install_cache
51
+ - *run_rspec
52
+ - store_test_results:
53
+ path: /tmp/test-results
54
+ - store_artifacts:
55
+ path: /tmp/test-results
56
+ destination: test-results
57
+ - run:
58
+ name: Rake Build
59
+ command: |
60
+ bundle exec rake build
61
+ - &rubocop
62
+ working_directory: ~/repo
63
+ steps:
64
+ - checkout
65
+ - *restore_bundle_install_cache
66
+ - *bundle_install
67
+ - *save_bundle_install_cache
68
+ - run: bundle exec rubocop
69
+
70
+ - &yardoc
71
+ working_directory: ~/repo
72
+ steps:
73
+ - checkout
74
+ - *restore_bundle_install_cache
75
+ - *bundle_install
76
+ - *save_bundle_install_cache
77
+ - run: bundle exec yardoc -o ./yardoc
78
+ - store_artifacts:
79
+ path: ./yardoc
80
+ destination: yardoc
81
+
82
+ jobs:
83
+ build_on_ruby_2.4:
84
+ docker:
85
+ - image: circleci/ruby:2.4-node-browsers
86
+ <<: *build
87
+ build_on_ruby_2.5:
88
+ docker:
89
+ - image: circleci/ruby:2.5-node-browsers
90
+ <<: *build
91
+ build_on_ruby_2.6:
92
+ docker:
93
+ - image: circleci/ruby:2.6-node-browsers
94
+ <<: *build
95
+ build_on_ruby_latest:
96
+ docker:
97
+ - image: circleci/ruby:latest-node-browsers-legacy
98
+ <<: *build
99
+ rubocop:
100
+ docker:
101
+ - image: circleci/ruby:2.4-node-browsers
102
+ <<: *rubocop
103
+ yardoc:
104
+ docker:
105
+ - image: circleci/ruby:2.4-node-browsers
106
+ <<: *yardoc
107
+
108
+ rubocop_challenge:
109
+ docker:
110
+ - image: circleci/ruby:2.4-node-browsers
111
+ working_directory: ~/repo
112
+ steps:
113
+ - checkout
114
+ - run:
115
+ name: Rubocop Challenge
116
+ command: |
117
+ gem install rubocop_challenger --pre
118
+ rubocop_challenger go --email=ryz310@gmail.com --name=ryz310
119
+ release:
120
+ docker:
121
+ - image: circleci/ruby:2.4-node-browsers
122
+ working_directory: ~/repo
123
+ steps:
124
+ - checkout
125
+ - *restore_bundle_install_cache
126
+ - *bundle_install
127
+ - *save_bundle_install_cache
128
+ - run:
129
+ name: Create Rubygems Credentials
130
+ command: |
131
+ mkdir ~/.gem
132
+ echo -e "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials
133
+ chmod 0600 ~/.gem/credentials
134
+ - run:
135
+ name: Release Gem
136
+ command: |
137
+ git push --set-upstream origin ${CIRCLE_BRANCH}
138
+ bundle exec rake release --trace
139
+ workflows:
140
+ version: 2
141
+
142
+ commit:
143
+ jobs:
144
+ - build_on_ruby_2.4
145
+ - build_on_ruby_2.5
146
+ - build_on_ruby_2.6
147
+ - build_on_ruby_latest
148
+ - rubocop
149
+ - yardoc
150
+ - release:
151
+ context: RubyGems API Key
152
+ requires:
153
+ - build_on_ruby_2.4
154
+ - build_on_ruby_2.5
155
+ - build_on_ruby_2.6
156
+ - build_on_ruby_latest
157
+ - rubocop
158
+ filters:
159
+ branches:
160
+ only:
161
+ - production
162
+
163
+ challenge:
164
+ triggers:
165
+ - schedule:
166
+ cron: "30 23 * * *" # 8:30am every day (JST)
167
+ filters:
168
+ branches:
169
+ only:
170
+ - master
171
+ jobs:
172
+ - rubocop_challenge
data/.envrc.skeleton ADDED
@@ -0,0 +1 @@
1
+ export GITHUB_ACCESS_TOKEN={GITHUB_ACCESS_TOKEN}
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,46 @@
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rspec
4
+
5
+ inherit_from: .rubocop_todo.yml
6
+
7
+ AllCops:
8
+ TargetRubyVersion: 2.4
9
+
10
+ Metrics/AbcSize:
11
+ Max: 20
12
+
13
+ Metrics/BlockLength:
14
+ Max: 50
15
+ Exclude:
16
+ - 'my_api_client.gemspec'
17
+ - 'spec/**/*'
18
+
19
+ Metrics/MethodLength:
20
+ Max: 15
21
+
22
+ Metrics/LineLength:
23
+ Max: 100
24
+
25
+ Style/ClassAndModuleChildren:
26
+ Exclude:
27
+ - 'spec/**/*'
28
+
29
+ Style/TrailingCommaInArrayLiteral:
30
+ EnforcedStyleForMultiline: comma
31
+
32
+ Style/TrailingCommaInHashLiteral:
33
+ EnforcedStyleForMultiline: comma
34
+
35
+ RSpec/ExampleLength:
36
+ Max: 10
37
+
38
+ RSpec/FilePath:
39
+ Exclude:
40
+ - 'spec/lib/my_api_client/errors/**/*'
41
+
42
+ RSpec/NestedGroups:
43
+ Max: 4
44
+
45
+ RSpec/MultipleExpectations:
46
+ Max: 4
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,7 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2019-04-23 22:11:50 +0900 using RuboCop version 0.67.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at ryz310@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ # Specify your gem's dependencies in my_api_client.gemspec
8
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,123 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ my_api_client (0.1.0)
5
+ activesupport (>= 4.2.0)
6
+ jsonpath
7
+ sawyer
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activesupport (5.2.3)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 0.7, < 2)
15
+ minitest (~> 5.1)
16
+ tzinfo (~> 1.1)
17
+ addressable (2.6.0)
18
+ public_suffix (>= 2.0.2, < 4.0)
19
+ ast (2.4.0)
20
+ byebug (11.0.1)
21
+ coderay (1.1.2)
22
+ concurrent-ruby (1.1.5)
23
+ crack (0.4.3)
24
+ safe_yaml (~> 1.0.0)
25
+ diff-lcs (1.3)
26
+ docile (1.3.1)
27
+ faraday (0.15.4)
28
+ multipart-post (>= 1.2, < 3)
29
+ hashdiff (0.3.9)
30
+ i18n (1.6.0)
31
+ concurrent-ruby (~> 1.0)
32
+ jaro_winkler (1.5.2)
33
+ json (2.2.0)
34
+ jsonpath (1.0.3)
35
+ multi_json
36
+ to_regexp (~> 0.2.1)
37
+ method_source (0.9.2)
38
+ minitest (5.11.3)
39
+ multi_json (1.13.1)
40
+ multipart-post (2.1.1)
41
+ octokit (4.14.0)
42
+ sawyer (~> 0.8.0, >= 0.5.3)
43
+ parallel (1.17.0)
44
+ parser (2.6.3.0)
45
+ ast (~> 2.4.0)
46
+ pr_comet (0.1.1)
47
+ octokit
48
+ pry (0.12.2)
49
+ coderay (~> 1.1.0)
50
+ method_source (~> 0.9.0)
51
+ pry-byebug (3.7.0)
52
+ byebug (~> 11.0)
53
+ pry (~> 0.10)
54
+ public_suffix (3.1.0)
55
+ rainbow (3.0.0)
56
+ rake (10.5.0)
57
+ rspec (3.8.0)
58
+ rspec-core (~> 3.8.0)
59
+ rspec-expectations (~> 3.8.0)
60
+ rspec-mocks (~> 3.8.0)
61
+ rspec-core (3.8.0)
62
+ rspec-support (~> 3.8.0)
63
+ rspec-expectations (3.8.3)
64
+ diff-lcs (>= 1.2.0, < 2.0)
65
+ rspec-support (~> 3.8.0)
66
+ rspec-mocks (3.8.0)
67
+ diff-lcs (>= 1.2.0, < 2.0)
68
+ rspec-support (~> 3.8.0)
69
+ rspec-support (3.8.0)
70
+ rspec_junit_formatter (0.4.1)
71
+ rspec-core (>= 2, < 4, != 2.12.0)
72
+ rubocop (0.70.0)
73
+ jaro_winkler (~> 1.5.1)
74
+ parallel (~> 1.10)
75
+ parser (>= 2.6)
76
+ rainbow (>= 2.2.2, < 4.0)
77
+ ruby-progressbar (~> 1.7)
78
+ unicode-display_width (>= 1.4.0, < 1.7)
79
+ rubocop-performance (1.3.0)
80
+ rubocop (>= 0.68.0)
81
+ rubocop-rspec (1.33.0)
82
+ rubocop (>= 0.60.0)
83
+ ruby-progressbar (1.10.0)
84
+ safe_yaml (1.0.5)
85
+ sawyer (0.8.2)
86
+ addressable (>= 2.3.5)
87
+ faraday (> 0.8, < 2.0)
88
+ simplecov (0.16.1)
89
+ docile (~> 1.1)
90
+ json (>= 1.8, < 3)
91
+ simplecov-html (~> 0.10.0)
92
+ simplecov-html (0.10.2)
93
+ thread_safe (0.3.6)
94
+ to_regexp (0.2.1)
95
+ tzinfo (1.2.5)
96
+ thread_safe (~> 0.1)
97
+ unicode-display_width (1.6.0)
98
+ webmock (3.5.1)
99
+ addressable (>= 2.3.6)
100
+ crack (>= 0.3.2)
101
+ hashdiff
102
+ yard (0.9.19)
103
+
104
+ PLATFORMS
105
+ ruby
106
+
107
+ DEPENDENCIES
108
+ bundler (~> 1.16)
109
+ my_api_client!
110
+ pr_comet
111
+ pry-byebug
112
+ rake (~> 10.0)
113
+ rspec
114
+ rspec_junit_formatter
115
+ rubocop
116
+ rubocop-performance
117
+ rubocop-rspec
118
+ simplecov
119
+ webmock
120
+ yard
121
+
122
+ BUNDLED WITH
123
+ 1.17.1