privy_wine_bouncer 1.0.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +23 -0
  5. data/.rubocop_todo.yml +182 -0
  6. data/.travis.yml +124 -0
  7. data/CHANGELOG.md +60 -0
  8. data/CONTRIBUTING.md +55 -0
  9. data/Gemfile +21 -0
  10. data/LICENSE.txt +22 -0
  11. data/README.md +238 -0
  12. data/Rakefile +11 -0
  13. data/UPGRADING.md +62 -0
  14. data/lib/generators/templates/wine_bouncer.rb +9 -0
  15. data/lib/generators/wine_bouncer/initializer_generator.rb +14 -0
  16. data/lib/privy_wine_bouncer.rb +3 -0
  17. data/lib/wine_bouncer/auth_methods/auth_methods.rb +38 -0
  18. data/lib/wine_bouncer/auth_strategies/default.rb +27 -0
  19. data/lib/wine_bouncer/auth_strategies/protected.rb +43 -0
  20. data/lib/wine_bouncer/auth_strategies/swagger.rb +33 -0
  21. data/lib/wine_bouncer/base_strategy.rb +7 -0
  22. data/lib/wine_bouncer/configuration.rb +70 -0
  23. data/lib/wine_bouncer/errors.rb +23 -0
  24. data/lib/wine_bouncer/extension.rb +24 -0
  25. data/lib/wine_bouncer/oauth2.rb +106 -0
  26. data/lib/wine_bouncer/version.rb +5 -0
  27. data/lib/wine_bouncer.rb +14 -0
  28. data/spec/dummy/README.rdoc +28 -0
  29. data/spec/dummy/Rakefile +6 -0
  30. data/spec/dummy/app/api/default_api.rb +71 -0
  31. data/spec/dummy/app/api/protected_api.rb +66 -0
  32. data/spec/dummy/app/api/swagger_api.rb +61 -0
  33. data/spec/dummy/app/assets/config/manifest.js +1 -0
  34. data/spec/dummy/app/assets/images/.keep +0 -0
  35. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  36. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  37. data/spec/dummy/app/controllers/application_controller.rb +7 -0
  38. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  39. data/spec/dummy/app/helpers/application_helper.rb +4 -0
  40. data/spec/dummy/app/mailers/.keep +0 -0
  41. data/spec/dummy/app/models/.keep +0 -0
  42. data/spec/dummy/app/models/concerns/.keep +0 -0
  43. data/spec/dummy/app/models/user.rb +4 -0
  44. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  45. data/spec/dummy/bin/bundle +3 -0
  46. data/spec/dummy/bin/rails +4 -0
  47. data/spec/dummy/bin/rake +4 -0
  48. data/spec/dummy/config/application.rb +31 -0
  49. data/spec/dummy/config/boot.rb +7 -0
  50. data/spec/dummy/config/database.yml +25 -0
  51. data/spec/dummy/config/environment.rb +7 -0
  52. data/spec/dummy/config/environments/development.rb +39 -0
  53. data/spec/dummy/config/environments/production.rb +80 -0
  54. data/spec/dummy/config/environments/test.rb +43 -0
  55. data/spec/dummy/config/initializers/assets.rb +10 -0
  56. data/spec/dummy/config/initializers/backtrace_silencers.rb +9 -0
  57. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  58. data/spec/dummy/config/initializers/doorkeeper.rb +94 -0
  59. data/spec/dummy/config/initializers/filter_parameter_logging.rb +6 -0
  60. data/spec/dummy/config/initializers/inflections.rb +18 -0
  61. data/spec/dummy/config/initializers/mime_types.rb +6 -0
  62. data/spec/dummy/config/initializers/secret_token.rb +6 -0
  63. data/spec/dummy/config/initializers/session_store.rb +5 -0
  64. data/spec/dummy/config/initializers/wrap_parameters.rb +16 -0
  65. data/spec/dummy/config/locales/doorkeeper.en.yml +71 -0
  66. data/spec/dummy/config/locales/en.yml +23 -0
  67. data/spec/dummy/config/routes.rb +8 -0
  68. data/spec/dummy/config/secrets.yml +22 -0
  69. data/spec/dummy/config.ru +4 -0
  70. data/spec/dummy/db/migrate/20140915153344_create_users.rb +11 -0
  71. data/spec/dummy/db/migrate/20140915160601_create_doorkeeper_tables.rb +43 -0
  72. data/spec/dummy/db/schema.rb +62 -0
  73. data/spec/dummy/lib/assets/.keep +0 -0
  74. data/spec/dummy/log/.keep +0 -0
  75. data/spec/dummy/public/404.html +67 -0
  76. data/spec/dummy/public/422.html +67 -0
  77. data/spec/dummy/public/500.html +66 -0
  78. data/spec/dummy/public/favicon.ico +0 -0
  79. data/spec/factories/access_token.rb +13 -0
  80. data/spec/factories/application.rb +8 -0
  81. data/spec/factories/user.rb +7 -0
  82. data/spec/intergration/oauth2_default_strategy_spec.rb +189 -0
  83. data/spec/intergration/oauth2_protected_strategy_spec.rb +199 -0
  84. data/spec/intergration/oauth2_swagger_strategy_spec.rb +156 -0
  85. data/spec/lib/generators/wine_bouncer/initializer_generator_spec.rb +19 -0
  86. data/spec/lib/wine_bouncer/auth_methods/auth_methods_spec.rb +105 -0
  87. data/spec/lib/wine_bouncer/auth_strategies/default_spec.rb +76 -0
  88. data/spec/lib/wine_bouncer/auth_strategies/swagger_spec.rb +115 -0
  89. data/spec/rails_helper.rb +79 -0
  90. data/spec/shared/orm/active_record.rb +4 -0
  91. data/spec/spec_helper.rb +95 -0
  92. data/wine_bouncer.gemspec +33 -0
  93. metadata +386 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 903679f47873135c431ab895be6864609e2364d9c98d07726431a8e2a9e906dc
4
+ data.tar.gz: 7748938e788ce557facc2912bbf7ce07d754b480ad8809b24829747472860ec1
5
+ SHA512:
6
+ metadata.gz: 5ab244645361ce64d076b0f56f57bb3b389a5124f96e061aee24f06b0bf6520f03a6899a78eec816bc5da80338fbae814f2a3cd9ebb12d81d7adc38db71fcc23
7
+ data.tar.gz: 6b3122b39c5cd23666351501b75293495a99a189b8f76bc1b26114629fa643a2a7c205cca1601037c7d96936c6b9c34e03e9e45cb40dea18a0cdd88afaa5d346
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /.idea/
11
+ *.bundle
12
+ *.so
13
+ *.o
14
+ *.a
15
+ mkmf.log
16
+ .rvmrc
17
+ .DS_Store
18
+ log/*.log
19
+ spec/dummy/db/*.sqlite3
20
+ spec/dummy/log/*.log
21
+ spec/dummy/tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,23 @@
1
+ # This is the configuration used to check the rubocop source code.
2
+
3
+ inherit_from: .rubocop_todo.yml
4
+
5
+ AllCops:
6
+ Exclude:
7
+ - 'vendor/**/*'
8
+ - 'spec/fixtures/**/*'
9
+ - 'spec/dummy/**/*'
10
+
11
+ Metrics/BlockLength:
12
+ Exclude:
13
+ - spec/**/*
14
+
15
+ LineLength:
16
+ Exclude:
17
+ - spec/**/*
18
+
19
+ StringLiterals:
20
+ Enabled: false
21
+
22
+ TrailingBlankLines:
23
+ Enabled: true
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,182 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2016-01-07 10:02:02 +0100 using RuboCop version 0.35.1.
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.
8
+
9
+ # Offense count: 2
10
+ Metrics/AbcSize:
11
+ Max: 29
12
+
13
+ # Offense count: 164
14
+ # Configuration parameters: AllowURI, URISchemes.
15
+ Metrics/LineLength:
16
+ Max: 198
17
+
18
+ # Offense count: 1
19
+ # Configuration parameters: CountComments.
20
+ Metrics/MethodLength:
21
+ Max: 32
22
+
23
+ # Offense count: 1
24
+ Style/AccessorMethodName:
25
+ Exclude:
26
+ - 'lib/wine_bouncer/oauth2.rb'
27
+
28
+ # Offense count: 1
29
+ # Cop supports --auto-correct.
30
+ Style/BlockComments:
31
+ Exclude:
32
+ - 'spec/spec_helper.rb'
33
+
34
+ # Offense count: 1
35
+ # Cop supports --auto-correct.
36
+ Style/CommentIndentation:
37
+ Exclude:
38
+ - 'spec/rails_helper.rb'
39
+
40
+ # Offense count: 14
41
+ # Configuration parameters: Exclude.
42
+ Style/Documentation:
43
+ Exclude:
44
+ - 'spec/**/*'
45
+ - 'test/**/*'
46
+ - 'lib/generators/wine_bouncer/initializer_generator.rb'
47
+ - 'lib/wine_bouncer.rb'
48
+ - 'lib/wine_bouncer/auth_methods/auth_methods.rb'
49
+ - 'lib/wine_bouncer/auth_strategies/default.rb'
50
+ - 'lib/wine_bouncer/auth_strategies/protected.rb'
51
+ - 'lib/wine_bouncer/auth_strategies/swagger.rb'
52
+ - 'lib/wine_bouncer/base_strategy.rb'
53
+ - 'lib/wine_bouncer/configuration.rb'
54
+ - 'lib/wine_bouncer/errors.rb'
55
+ - 'lib/wine_bouncer/extension.rb'
56
+ - 'lib/wine_bouncer/oauth2.rb'
57
+ - 'lib/wine_bouncer/version.rb'
58
+
59
+ # Offense count: 6
60
+ Style/DoubleNegation:
61
+ Exclude:
62
+ - 'lib/wine_bouncer/auth_methods/auth_methods.rb'
63
+ - 'lib/wine_bouncer/auth_strategies/default.rb'
64
+ - 'lib/wine_bouncer/auth_strategies/protected.rb'
65
+ - 'lib/wine_bouncer/auth_strategies/swagger.rb'
66
+
67
+ # Offense count: 4
68
+ # Cop supports --auto-correct.
69
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
70
+ Style/EmptyLinesAroundModuleBody:
71
+ Exclude:
72
+ - 'lib/wine_bouncer/configuration.rb'
73
+ - 'spec/dummy/app/api/default_api.rb'
74
+ - 'spec/dummy/app/api/protected_api.rb'
75
+ - 'spec/dummy/app/api/swagger_api.rb'
76
+
77
+ # Offense count: 14
78
+ # Cop supports --auto-correct.
79
+ # Configuration parameters: AllowForAlignment.
80
+ Style/ExtraSpacing:
81
+ Exclude:
82
+ - 'spec/dummy/bin/rails'
83
+ - 'spec/dummy/config.ru'
84
+ - 'spec/dummy/db/migrate/20140915160601_create_doorkeeper_tables.rb'
85
+ - 'spec/dummy/db/schema.rb'
86
+
87
+ # Offense count: 1
88
+ # Configuration parameters: MinBodyLength.
89
+ Style/GuardClause:
90
+ Exclude:
91
+ - 'lib/wine_bouncer/oauth2.rb'
92
+
93
+ # Offense count: 3
94
+ # Cop supports --auto-correct.
95
+ # Configuration parameters: Width.
96
+ Style/IndentationWidth:
97
+ Exclude:
98
+ - 'lib/wine_bouncer/auth_methods/auth_methods.rb'
99
+ - 'lib/wine_bouncer/auth_strategies/default.rb'
100
+ - 'lib/wine_bouncer/auth_strategies/swagger.rb'
101
+
102
+ # Offense count: 7
103
+ # Cop supports --auto-correct.
104
+ Style/LeadingCommentSpace:
105
+ Exclude:
106
+ - 'lib/wine_bouncer/oauth2.rb'
107
+ - 'spec/dummy/config/environments/test.rb'
108
+ - 'spec/intergration/oauth2_default_strategy_spec.rb'
109
+ - 'spec/intergration/oauth2_protected_strategy_spec.rb'
110
+ - 'spec/intergration/oauth2_swagger_strategy_spec.rb'
111
+ - 'spec/rails_helper.rb'
112
+
113
+ # Offense count: 21
114
+ # Cop supports --auto-correct.
115
+ Style/MethodCallWithoutArgsParentheses:
116
+ Exclude:
117
+ - 'spec/lib/wine_bouncer/auth_strategies/default_spec.rb'
118
+ - 'spec/lib/wine_bouncer/auth_strategies/swagger_spec.rb'
119
+
120
+ # Offense count: 1
121
+ # Cop supports --auto-correct.
122
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
123
+ Style/MethodDefParentheses:
124
+ Enabled: false
125
+
126
+ # Offense count: 2
127
+ # Cop supports --auto-correct.
128
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
129
+ Style/MultilineOperationIndentation:
130
+ Enabled: false
131
+
132
+ # Offense count: 1
133
+ # Cop supports --auto-correct.
134
+ Style/NumericLiterals:
135
+ MinDigits: 15
136
+
137
+ # Offense count: 1
138
+ # Cop supports --auto-correct.
139
+ # Configuration parameters: PreferredDelimiters.
140
+ Style/PercentLiteralDelimiters:
141
+ Exclude:
142
+ - 'wine_bouncer.gemspec'
143
+
144
+ # Offense count: 7
145
+ # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
146
+ Style/PredicateName:
147
+ Exclude:
148
+ - 'lib/wine_bouncer/auth_methods/auth_methods.rb'
149
+ - 'lib/wine_bouncer/auth_strategies/default.rb'
150
+ - 'lib/wine_bouncer/auth_strategies/protected.rb'
151
+ - 'lib/wine_bouncer/auth_strategies/swagger.rb'
152
+
153
+ # Offense count: 1
154
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
155
+ Style/RaiseArgs:
156
+ Enabled: false
157
+
158
+ # Offense count: 2
159
+ # Cop supports --auto-correct.
160
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
161
+ Style/SignalException:
162
+ Exclude:
163
+ - 'lib/wine_bouncer/oauth2.rb'
164
+
165
+ # Offense count: 1
166
+ # Cop supports --auto-correct.
167
+ Style/SpaceAfterComma:
168
+ Exclude:
169
+ - 'spec/lib/wine_bouncer/auth_strategies/swagger_spec.rb'
170
+
171
+ # Offense count: 1
172
+ # Cop supports --auto-correct.
173
+ # Configuration parameters: IgnoredMethods.
174
+ Style/SymbolProc:
175
+ Exclude:
176
+ - 'lib/wine_bouncer/extension.rb'
177
+
178
+ # Offense count: 1
179
+ # Cop supports --auto-correct.
180
+ Style/UnneededPercentQ:
181
+ Exclude:
182
+ - 'wine_bouncer.gemspec'
data/.travis.yml ADDED
@@ -0,0 +1,124 @@
1
+ sudo: false
2
+ language: ruby
3
+
4
+ before_install:
5
+ - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
6
+ - gem install bundler -v '< 2'
7
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
8
+ - chmod +x ./cc-test-reporter
9
+
10
+
11
+ install:
12
+ - bundle install --without production --path=${BUNDLE_PATH:-vendor/bundle} # Install ruby gems, excluding production only gems such as unicorn (already present by default in Travis)
13
+
14
+ cache:
15
+ - bundler: true
16
+
17
+ rvm:
18
+ - 2.4.5
19
+ - 2.5.3
20
+ - 2.6.0
21
+
22
+ env:
23
+ global:
24
+ CC_TEST_REPORTER_ID=ab1b6ce5f973da033f80ae2e99fadbb32b2f9c37892703956d8ef954c8e8134e
25
+ jobs:
26
+ - rails="~> 5.1.6.1" grape=1.0.3 doorkeeper=4.4.3
27
+ - rails="~> 5.1.6.1" grape=1.0.3 doorkeeper=5.0.2
28
+ - rails="~> 5.1.6.1" grape=1.0.3 doorkeeper=5.1.0
29
+ - rails="~> 5.1.6.1" grape=1.0.3 doorkeeper=5.2.3
30
+ - rails="~> 5.1.6.1" grape=1.1.0 doorkeeper=4.4.3
31
+ - rails="~> 5.1.6.1" grape=1.1.0 doorkeeper=5.0.2
32
+ - rails="~> 5.1.6.1" grape=1.1.0 doorkeeper=5.1.0
33
+ - rails="~> 5.1.6.1" grape=1.1.0 doorkeeper=5.2.3
34
+ - rails="~> 5.1.6.1" grape=1.2.5 doorkeeper=4.4.3
35
+ - rails="~> 5.1.6.1" grape=1.2.5 doorkeeper=5.0.2
36
+ - rails="~> 5.1.6.1" grape=1.2.5 doorkeeper=5.1.0
37
+ - rails="~> 5.1.6.1" grape=1.2.5 doorkeeper=5.2.3
38
+ - rails="~> 5.1.6.1" grape=1.3.0 doorkeeper=4.4.3
39
+ - rails="~> 5.1.6.1" grape=1.3.0 doorkeeper=5.0.2
40
+ - rails="~> 5.1.6.1" grape=1.3.0 doorkeeper=5.1.0
41
+ - rails="~> 5.1.6.1" grape=1.3.0 doorkeeper=5.2.3
42
+ - rails="~> 5.2.4.1" grape=1.0.3 doorkeeper=4.4.3
43
+ - rails="~> 5.2.4.1" grape=1.0.3 doorkeeper=5.0.2
44
+ - rails="~> 5.2.4.1" grape=1.0.3 doorkeeper=5.1.0
45
+ - rails="~> 5.2.4.1" grape=1.0.3 doorkeeper=5.2.3
46
+ - rails="~> 5.2.4.1" grape=1.1.0 doorkeeper=4.4.3
47
+ - rails="~> 5.2.4.1" grape=1.1.0 doorkeeper=5.0.2
48
+ - rails="~> 5.2.4.1" grape=1.1.0 doorkeeper=5.1.0
49
+ - rails="~> 5.2.4.1" grape=1.1.0 doorkeeper=5.2.3
50
+ - rails="~> 5.2.4.1" grape=1.2.5 doorkeeper=4.4.3
51
+ - rails="~> 5.2.4.1" grape=1.2.5 doorkeeper=5.0.2
52
+ - rails="~> 5.2.4.1" grape=1.2.5 doorkeeper=5.1.0
53
+ - rails="~> 5.2.4.1" grape=1.2.5 doorkeeper=5.2.3
54
+ - rails="~> 5.2.4.1" grape=1.3.0 doorkeeper=4.4.3
55
+ - rails="~> 5.2.4.1" grape=1.3.0 doorkeeper=5.0.2
56
+ - rails="~> 5.2.4.1" grape=1.3.0 doorkeeper=5.1.0
57
+ - rails="~> 5.2.4.1" grape=1.3.0 doorkeeper=5.2.3
58
+ - rails="~> 6.0.2" grape=1.0.3 doorkeeper=4.4.3
59
+ - rails="~> 6.0.2" grape=1.0.3 doorkeeper=5.0.2
60
+ - rails="~> 6.0.2" grape=1.0.3 doorkeeper=5.1.0
61
+ - rails="~> 6.0.2" grape=1.0.3 doorkeeper=5.2.3
62
+ - rails="~> 6.0.2" grape=1.1.0 doorkeeper=4.4.3
63
+ - rails="~> 6.0.2" grape=1.1.0 doorkeeper=5.0.2
64
+ - rails="~> 6.0.2" grape=1.1.0 doorkeeper=5.1.0
65
+ - rails="~> 6.0.2" grape=1.1.0 doorkeeper=5.2.3
66
+ - rails="~> 6.0.2" grape=1.2.5 doorkeeper=4.4.3
67
+ - rails="~> 6.0.2" grape=1.2.5 doorkeeper=5.0.2
68
+ - rails="~> 6.0.2" grape=1.2.5 doorkeeper=5.1.0
69
+ - rails="~> 6.0.2" grape=1.2.5 doorkeeper=5.2.3
70
+ - rails="~> 6.0.2" grape=1.3.0 doorkeeper=4.4.3
71
+ - rails="~> 6.0.2" grape=1.3.0 doorkeeper=5.0.2
72
+ - rails="~> 6.0.2" grape=1.3.0 doorkeeper=5.1.0
73
+ - rails="~> 6.0.2" grape=1.3.0 doorkeeper=5.2.3
74
+
75
+ jobs:
76
+ exclude:
77
+ - rvm: 2.4.5
78
+ env: rails="~> 6.0.2" grape=1.0.3 doorkeeper=4.4.3
79
+ - rvm: 2.4.5
80
+ env: rails="~> 6.0.2" grape=1.0.3 doorkeeper=5.0.2
81
+ - rvm: 2.4.5
82
+ env: rails="~> 6.0.2" grape=1.0.3 doorkeeper=5.1.0
83
+ - rvm: 2.4.5
84
+ env: rails="~> 6.0.2" grape=1.0.3 doorkeeper=5.2.3
85
+ - rvm: 2.4.5
86
+ env: rails="~> 6.0.2" grape=1.1.0 doorkeeper=4.4.3
87
+ - rvm: 2.4.5
88
+ env: rails="~> 6.0.2" grape=1.1.0 doorkeeper=5.0.2
89
+ - rvm: 2.4.5
90
+ env: rails="~> 6.0.2" grape=1.1.0 doorkeeper=5.1.0
91
+ - rvm: 2.4.5
92
+ env: rails="~> 6.0.2" grape=1.1.0 doorkeeper=5.2.3
93
+ - rvm: 2.4.5
94
+ env: rails="~> 6.0.2" grape=1.2.5 doorkeeper=4.4.3
95
+ - rvm: 2.4.5
96
+ env: rails="~> 6.0.2" grape=1.2.5 doorkeeper=5.0.2
97
+ - rvm: 2.4.5
98
+ env: rails="~> 6.0.2" grape=1.2.5 doorkeeper=5.1.0
99
+ - rvm: 2.4.5
100
+ env: rails="~> 6.0.2" grape=1.2.5 doorkeeper=5.2.3
101
+ - rvm: 2.4.5
102
+ env: rails="~> 6.0.2" grape=1.3.0 doorkeeper=4.4.3
103
+ - rvm: 2.4.5
104
+ env: rails="~> 6.0.2" grape=1.3.0 doorkeeper=5.0.2
105
+ - rvm: 2.4.5
106
+ env: rails="~> 6.0.2" grape=1.3.0 doorkeeper=5.1.0
107
+ - rvm: 2.4.5
108
+ env: rails="~> 6.0.2" grape=1.3.0 doorkeeper=5.2.3
109
+
110
+
111
+ script:
112
+ #- bundle exec rubocop -DESP # Backend add in future.
113
+ - bundle exec rake # Backend specs
114
+
115
+ # Pipe the coverage data to Code Climate
116
+ after_script:
117
+ - ./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.backend.json coverage/backend/.resultset.json # Format backend coverage
118
+ - ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2 # Sum both coverage parts into coverage/codeclimate.json
119
+ - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi # Upload coverage/codeclimate.json
120
+
121
+ notifications:
122
+ hipchat:
123
+ rooms:
124
+ secure: SUWenlDzlDbpryO1QzD+rN4MxIBpAAzwsFqnnkyRQ11thRVdvKuT2TUd+RlYImLXDNkvNjqmpXh7mihtcro9g8unR3nF1UKbuAPIv2kCklsio0jAnjVn7+h1l56hsa90Jy9t/YpKtoLx2QNWLz70n8VrtGJMAt53T6tZdgNUp58=
data/CHANGELOG.md ADDED
@@ -0,0 +1,60 @@
1
+ Changelog
2
+ =========
3
+
4
+ ## Unreleased
5
+
6
+ ## 1.0.4
7
+
8
+ * [#78](https://github.com/antek-drzewiecki/wine_bouncer/pull/78): Grape support for 1.2.x. Thank you @eitoball
9
+ * [#77](https://github.com/antek-drzewiecki/wine_bouncer/pull/77): Upgrade to doorkeeper 5.0. Thank you @JWesorick
10
+
11
+ ## 1.0.3
12
+ * [#76](https://github.com/antek-drzewiecki/wine_bouncer/pull/76): Updated test matrix to test against recent versions.
13
+ * [#74](https://github.com/antek-drzewiecki/wine_bouncer/pull/74): Support for Doorkeeper < 5.0. Thanks @stereoscott
14
+ * [#72](https://github.com/antek-drzewiecki/wine_bouncer/pull/72): Support for Grape 1.1.x. Thanks @gustavolobo
15
+
16
+ ## 1.0.2
17
+ * [#68](https://github.com/antek-drzewiecki/wine_bouncer/pull/68): Update dependency to allow grape v1. Thanks @chandeeland
18
+
19
+ ## 1.0.1
20
+ * [#65](https://github.com/antek-drzewiecki/wine_bouncer/pull/65): Support for Doorkeeper 4.1 and 4.2. Thanks @daveallie
21
+
22
+ ## 1.0
23
+ * [#61](https://github.com/antek-drzewiecki/wine_bouncer/pull/61): Travis cleanup Rails 4.1.x is EOL. Ruby 2.0 is unsupported.
24
+ * [#60](https://github.com/antek-drzewiecki/wine_bouncer/pull/60): Rails 5, Doorkeeper 4, grape 0.16.2 support. Thanks @texpert
25
+
26
+ ## 0.5.1
27
+ * [#57](https://github.com/antek-drzewiecki/wine_bouncer/pull/57): Removed locks for doorkeeper
28
+ * [#56](https://github.com/antek-drzewiecki/wine_bouncer/pull/56): Grape 0.14.x support, removed locks.
29
+ * Tested against ruby 2.3.0
30
+
31
+ ## 0.5.0
32
+ * [#50](https://github.com/antek-drzewiecki/wine_bouncer/pull/50): Grape 0.13.x support
33
+ * [#48](https://github.com/antek-drzewiecki/wine_bouncer/pull/48): Bind Doorkeeper error response into WineBouncer errors
34
+ * [#47](https://github.com/antek-drzewiecki/wine_bouncer/pull/47): Doorkeeper 3.0.x support
35
+
36
+ ## 0.4.0
37
+ * [#42](https://github.com/antek-drzewiecki/wine_bouncer/pull/42): Added support for Doorkeeper 2.2
38
+ * [#41](https://github.com/antek-drzewiecki/wine_bouncer/pull/41): Added support for Grape 0.12.0, Removed support for Grape 0.8 and 0.9 (though they still work).
39
+ * [#39](https://github.com/antek-drzewiecki/wine_bouncer/pull/39): Add option to disable WineBouncer conditionally. Thanks @Fryie .
40
+
41
+ ## 0.3.1
42
+ * [#31](https://github.com/antek-drzewiecki/wine_bouncer/pull/31): Improves support for default scopes trough DSL.
43
+ * [#30](https://github.com/antek-drzewiecki/wine_bouncer/pull/30): Restricted grape dependencies to the next minor level of grape.
44
+ * [#29](https://github.com/antek-drzewiecki/wine_bouncer/pull/29): Doorkeepers dependencies are restricted to minor levels. Thanks @nickcharlton
45
+ * [#27](https://github.com/antek-drzewiecki/wine_bouncer/pull/27): Fixes DSL default and protected strategy. Fixes #24 and #26.
46
+
47
+ ## 0.3.0
48
+ * [#21](https://github.com/antek-drzewiecki/wine_bouncer/pull/21): Added an Easy DSL for WineBouncer. Thanks @masarakki .
49
+ * [#23](https://github.com/antek-drzewiecki/wine_bouncer/pull/23): Added support for Doorkeeper 2.1.1 and refactored strategies.
50
+
51
+ ## 0.2.2
52
+ * [#17](https://github.com/antek-drzewiecki/wine_bouncer/pull/17): Added a new protected strategy. Thanks @whatasunnyday .
53
+
54
+ ## 0.2.1
55
+ * [#12](https://github.com/antek-drzewiecki/wine_bouncer/pull/12): Added a rails generator to generate the WineBouncer configuration file. Thanks @whatasunnyday.
56
+ * [#7](https://github.com/antek-drzewiecki/wine_bouncer/pull/7): Added support for Doorkeeper 2.0.0 and 2.0.1. Thanks @whatasunnyday .
57
+
58
+ ## 0.2.0
59
+ * [#4](https://github.com/antek-drzewiecki/wine_bouncer/pull/4): Support for newer versions of grape ( > 0.8 ).
60
+ * [#6](https://github.com/antek-drzewiecki/wine_bouncer/pull/6): Added the option to configure the resource owner.
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,55 @@
1
+ Changelog
2
+ =========
3
+
4
+ ## Fork the project
5
+
6
+ Fork the project on the [project page]( https://github.com/Antek-drzewiecki/wine_bouncer/fork )
7
+
8
+ Checkout the project from your own repository.
9
+
10
+ ```
11
+ git clone https://github.com/[your github username]/wine_bouncer.git
12
+ cd wine_bouncer
13
+ git remote add upstream https://github.com/Antek-drzewiecki/wine_bouncer.git
14
+ ```
15
+
16
+ ## Create your feature branch
17
+
18
+ Make sure your fork is [up to date](https://help.github.com/articles/syncing-a-fork) and make a feature from the master branch.
19
+
20
+ `git checkout -b my-new-feature`
21
+
22
+ ## Prepare your development environment
23
+
24
+ See [README](README.md#development)
25
+
26
+ Run your specs to make sure nothing is broken ;)
27
+
28
+ ## Write Tests and/or Code
29
+
30
+ We appreciate pull requests. Even specs only to identify an problem!
31
+
32
+ Because we want to ensure the quality of our gem. We cannot accept functional changes without tests.
33
+
34
+ ## Write documentation
35
+
36
+ Documentation is appreciated. Its nice to know people know how to use features.
37
+ Also feel free to update the changelog with the changes.
38
+
39
+ ## Commit your changes
40
+
41
+ Commit your changes.
42
+ `git add ...`
43
+ `git commit -m 'Add some feature'`
44
+
45
+ ## Push your changes
46
+
47
+ Push to the branch.
48
+
49
+ `git push origin my-new-feature`
50
+
51
+ ## Create a pull request
52
+
53
+ Check your feature branch, once its passes Travis-CI, create a pull request
54
+
55
+ Thanks you for participating!
data/Gemfile ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ ENV['grape'] ||= '1.3.0'
6
+ ENV['rails'] ||= '~> 6.0.0'
7
+ ENV['doorkeeper'] ||= '5.0.0'
8
+
9
+ gem 'rails', ENV['rails']
10
+ # ActiveRecord 5 needs sqlite3 ~> 1.3 and ActiveRectod 6 needs ~>1.4
11
+ gem 'sqlite3', ENV['rails'].match(/5\.\d\.\d/) ? '~> 1.3.6' : '~> 1.4.2'
12
+
13
+ # Change in the rack response API broke grape <1.3
14
+ # Version lock rack for those versions of grape
15
+ gem 'rack', '2.0.8' unless ENV['grape'].match(/1\.3\.\d/)
16
+
17
+ gem 'doorkeeper', ENV['doorkeeper']
18
+ gem 'grape', ENV['grape']
19
+
20
+ # Specify your gem's dependencies in wine_bouncer.gemspec
21
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Antek Drzewiecki
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.