martinet-rails 0.0.1

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
+ SHA1:
3
+ metadata.gz: 1f98ebab4ed6d8e11025c6370aacf3a22c852c31
4
+ data.tar.gz: 12f6da2f76a910e9c43c74e54f86fd35abff56ce
5
+ SHA512:
6
+ metadata.gz: 7990e726738b595867b1b6d6d77cc9289388b8c7cbd377f21a9ae68f050c1bab170f39e84f470db177bab5c21966ea86cdb05d06e5df63ed4503cc698eb1f522
7
+ data.tar.gz: ea3179360c48cc43440b280208eb64a45a497f48d188fa0cf7d1216e48a5470bdd19c582105920745550acb5d45ba1eb669c585815868de9a5f8b527ea9edb30
data/.codeclimate.yml ADDED
@@ -0,0 +1,23 @@
1
+ ---
2
+ engines:
3
+ duplication:
4
+ enabled: true
5
+ config:
6
+ languages:
7
+ - ruby
8
+ fixme:
9
+ enabled: true
10
+ markdownlint:
11
+ enabled: true
12
+ reek:
13
+ enabled: true
14
+ rubocop:
15
+ enabled: true
16
+
17
+ ratings:
18
+ paths:
19
+ - "**.rb"
20
+ - "**.md"
21
+
22
+ exclude_paths:
23
+ - test/**/*
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rvm
12
+ .ruby-gemset
13
+ .ruby-version
14
+
15
+ *.gemfile.lock
data/.hound.yml ADDED
@@ -0,0 +1,4 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
3
+
4
+ fail_on_violations: true
data/.rubocop.yml ADDED
@@ -0,0 +1,248 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.1
3
+ Exclude:
4
+ - "vendor/**/*"
5
+ - "db/schema.rb"
6
+ UseCache: false
7
+ Style/CollectionMethods:
8
+ Description: Preferred collection methods.
9
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
10
+ Enabled: true
11
+ PreferredMethods:
12
+ collect: map
13
+ collect!: map!
14
+ find: detect
15
+ find_all: select
16
+ reduce: inject
17
+ Style/DotPosition:
18
+ Description: Checks the position of the dot in multi-line method calls.
19
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
20
+ Enabled: true
21
+ EnforcedStyle: trailing
22
+ SupportedStyles:
23
+ - leading
24
+ - trailing
25
+ Style/FileName:
26
+ Description: Use snake_case for source file names.
27
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
28
+ Enabled: false
29
+ Exclude: []
30
+ Style/GuardClause:
31
+ Description: Check for conditionals that can be replaced with guard clauses
32
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
33
+ Enabled: false
34
+ MinBodyLength: 1
35
+ Style/IfUnlessModifier:
36
+ Description: Favor modifier if/unless usage when you have a single-line body.
37
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
38
+ Enabled: false
39
+ MaxLineLength: 80
40
+ Style/OptionHash:
41
+ Description: Don't use option hashes when you can use keyword arguments.
42
+ Enabled: false
43
+ Style/PercentLiteralDelimiters:
44
+ Description: Use `%`-literal delimiters consistently
45
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
46
+ Enabled: false
47
+ PreferredDelimiters:
48
+ "%": "()"
49
+ "%i": "()"
50
+ "%q": "()"
51
+ "%Q": "()"
52
+ "%r": "{}"
53
+ "%s": "()"
54
+ "%w": "()"
55
+ "%W": "()"
56
+ "%x": "()"
57
+ Style/PredicateName:
58
+ Description: Check the names of predicate methods.
59
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
60
+ Enabled: true
61
+ NamePrefix:
62
+ - is_
63
+ - has_
64
+ - have_
65
+ NamePrefixBlacklist:
66
+ - is_
67
+ Exclude:
68
+ - spec/**/*
69
+ Style/RaiseArgs:
70
+ Description: Checks the arguments passed to raise/fail.
71
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
72
+ Enabled: false
73
+ EnforcedStyle: exploded
74
+ SupportedStyles:
75
+ - compact
76
+ - exploded
77
+ Style/SignalException:
78
+ Description: Checks for proper usage of fail and raise.
79
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
80
+ Enabled: false
81
+ EnforcedStyle: semantic
82
+ SupportedStyles:
83
+ - only_raise
84
+ - only_fail
85
+ - semantic
86
+ Style/SingleLineBlockParams:
87
+ Description: Enforces the names of some block params.
88
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
89
+ Enabled: false
90
+ Methods:
91
+ - reduce:
92
+ - a
93
+ - e
94
+ - inject:
95
+ - a
96
+ - e
97
+ Style/SingleLineMethods:
98
+ Description: Avoid single-line methods.
99
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
100
+ Enabled: false
101
+ AllowIfMethodIsEmpty: true
102
+ Style/StringLiterals:
103
+ Description: Checks if uses of quotes match the configured preference.
104
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
105
+ Enabled: true
106
+ EnforcedStyle: single_quotes
107
+ SupportedStyles:
108
+ - single_quotes
109
+ - double_quotes
110
+ Style/StringLiteralsInInterpolation:
111
+ Description: Checks if uses of quotes inside expressions in interpolated strings
112
+ match the configured preference.
113
+ Enabled: true
114
+ EnforcedStyle: single_quotes
115
+ SupportedStyles:
116
+ - single_quotes
117
+ - double_quotes
118
+ Style/TrailingCommaInArguments:
119
+ Description: 'Checks for trailing comma in argument lists.'
120
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
121
+ Enabled: false
122
+ EnforcedStyleForMultiline: no_comma
123
+ SupportedStyles:
124
+ - comma
125
+ - consistent_comma
126
+ - no_comma
127
+ Style/TrailingCommaInLiteral:
128
+ Description: 'Checks for trailing comma in array and hash literals.'
129
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
130
+ Enabled: false
131
+ EnforcedStyleForMultiline: no_comma
132
+ SupportedStyles:
133
+ - comma
134
+ - consistent_comma
135
+ - no_comma
136
+ Metrics/AbcSize:
137
+ Description: A calculated magnitude based on number of assignments, branches, and
138
+ conditions.
139
+ Enabled: false
140
+ Max: 15
141
+ Metrics/ClassLength:
142
+ Description: Avoid classes longer than 100 lines of code.
143
+ Enabled: false
144
+ CountComments: false
145
+ Max: 100
146
+ Metrics/ModuleLength:
147
+ CountComments: false
148
+ Max: 100
149
+ Description: Avoid modules longer than 100 lines of code.
150
+ Enabled: false
151
+ Metrics/CyclomaticComplexity:
152
+ Description: A complexity metric that is strongly correlated to the number of test
153
+ cases needed to validate a method.
154
+ Enabled: false
155
+ Max: 6
156
+ Metrics/MethodLength:
157
+ Description: Avoid methods longer than 10 lines of code.
158
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
159
+ Enabled: false
160
+ CountComments: false
161
+ Max: 10
162
+ Metrics/ParameterLists:
163
+ Description: Avoid parameter lists longer than three or four parameters.
164
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
165
+ Enabled: false
166
+ Max: 5
167
+ CountKeywordArgs: true
168
+ Metrics/PerceivedComplexity:
169
+ Description: A complexity metric geared towards measuring complexity for a human
170
+ reader.
171
+ Enabled: false
172
+ Max: 7
173
+ Lint/AssignmentInCondition:
174
+ Description: Don't use assignment in conditions.
175
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
176
+ Enabled: false
177
+ AllowSafeAssignment: true
178
+ Style/InlineComment:
179
+ Description: Avoid inline comments.
180
+ Enabled: false
181
+ Style/AccessorMethodName:
182
+ Description: Check the naming of accessor methods for get_/set_.
183
+ Enabled: false
184
+ Style/Alias:
185
+ Description: Use alias_method instead of alias.
186
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
187
+ Enabled: false
188
+ Style/Documentation:
189
+ Description: Document classes and non-namespace modules.
190
+ Enabled: false
191
+ Style/DoubleNegation:
192
+ Description: Checks for uses of double negation (!!).
193
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
194
+ Enabled: false
195
+ Style/EachWithObject:
196
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
197
+ Enabled: false
198
+ Style/EmptyLiteral:
199
+ Description: Prefer literals to Array.new/Hash.new/String.new.
200
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
201
+ Enabled: false
202
+ Style/ModuleFunction:
203
+ Description: Checks for usage of `extend self` in modules.
204
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
205
+ Enabled: false
206
+ Style/OneLineConditional:
207
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
208
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
209
+ Enabled: false
210
+ Style/PerlBackrefs:
211
+ Description: Avoid Perl-style regex back references.
212
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
213
+ Enabled: false
214
+ Style/Send:
215
+ Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
216
+ may overlap with existing methods.
217
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
218
+ Enabled: false
219
+ Style/SpecialGlobalVars:
220
+ Description: Avoid Perl-style global variables.
221
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
222
+ Enabled: false
223
+ Style/VariableInterpolation:
224
+ Description: Don't interpolate global, instance and class variables directly in
225
+ strings.
226
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
227
+ Enabled: false
228
+ Style/WhenThen:
229
+ Description: Use when x then ... for one-line cases.
230
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
231
+ Enabled: false
232
+ Lint/EachWithObjectArgument:
233
+ Description: Check for immutable argument given to each_with_object.
234
+ Enabled: true
235
+ Lint/HandleExceptions:
236
+ Description: Don't suppress exception.
237
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
238
+ Enabled: false
239
+ Lint/LiteralInCondition:
240
+ Description: Checks of literals used in conditions.
241
+ Enabled: false
242
+ Lint/LiteralInInterpolation:
243
+ Description: Checks for literals used in interpolation.
244
+ Enabled: false
245
+
246
+ # Custom
247
+ Metrics/LineLength:
248
+ Max: 117
data/.travis.yml ADDED
@@ -0,0 +1,39 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - ruby-head
5
+ - 2.3.0
6
+ - 2.2.4
7
+ - 2.1.10
8
+
9
+ gemfile:
10
+ - gemfiles/activerecord_4_1.gemfile
11
+ - gemfiles/activerecord_4_2.gemfile
12
+ - gemfiles/activerecord_5_0.gemfile
13
+ - gemfiles/github_head.gemfile
14
+
15
+ matrix:
16
+ fast_finish: true
17
+ allow_failures:
18
+ - gemfile: gemfiles/activerecord_head.gemfile
19
+ exclude:
20
+ - gemfile: gemfiles/activerecord_head.gemfile
21
+ rvm: 2.1.10
22
+ - gemfile: gemfiles/activerecord_5_0.gemfile
23
+ rvm: 2.1.10
24
+
25
+ before_install:
26
+ - gem update --system
27
+ - gem update bundler
28
+ - gem cleanup bundler
29
+
30
+ branches:
31
+ only:
32
+ - master
33
+
34
+ sudo: false
35
+
36
+ cache: bundler
37
+
38
+ notifications:
39
+ email: false
data/Appraisals ADDED
@@ -0,0 +1,16 @@
1
+ appraise 'activerecord_4_1' do
2
+ gem 'activerecord', '~> 4.1.0', '>= 4.1.15'
3
+ end
4
+
5
+ appraise 'activerecord_4_2' do
6
+ gem 'activerecord', '~> 4.2.0', '>= 4.2.6'
7
+ end
8
+
9
+ appraise 'activerecord_5_0' do
10
+ gem 'activerecord', '>= 5.0.0.beta3', '< 5.1'
11
+ end
12
+
13
+ appraise 'github_head' do
14
+ gem 'activerecord', git: 'https://github.com/rails/rails.git'
15
+ gem 'martinet', git: 'https://github.com/TangRufus/martinet.git'
16
+ end
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at tangrufus@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in martinet-rails.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Tang Rufus
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Martinet::Rails
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/martinet/rails`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'martinet-rails'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install martinet-rails
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/martinet-rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << 'test'
6
+ t.libs << 'lib'
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task default: :test
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 4.1.0", ">= 4.1.15"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 4.2.0", ">= 4.2.6"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", ">= 5.0.0.beta3", "< 5.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", :git => "https://github.com/rails/rails.git"
6
+ gem "martinet", :git => "https://github.com/TangRufus/martinet.git"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,18 @@
1
+ module Martinet
2
+ module Rails
3
+ class Railtie < Rails::Railtie
4
+ # TODO: Test me
5
+ initializer 'martinet.setup_warden-manager' do |app|
6
+ app.middleware.use Warden::Manager do |config|
7
+ config.serialize_into_session do |user|
8
+ Serializer.serialize(record: user)
9
+ end
10
+
11
+ config.serialize_from_session do |object_hash|
12
+ Serializer.deserialize(object_hash: object_hash)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,34 @@
1
+ module Martinet
2
+ module Rails
3
+ class Serializer
4
+ def self.serialize(record:)
5
+ return record unless serializable?(record: record)
6
+ { klass: record.class.name, record_id: record.id }
7
+ end
8
+
9
+ def self.deserialize(object_hash:)
10
+ record_for(object_hash: object_hash) || object_hash
11
+ end
12
+
13
+ def self.record_for(object_hash:)
14
+ return unless deserializable?(object_hash: object_hash)
15
+
16
+ record_klass = object_hash[:klass].safe_constantize
17
+ record_klass.find_by(id: object_hash[:record_id])
18
+ end
19
+
20
+ # FIXME: Refactor this method
21
+ def self.serializable?(record:)
22
+ record.respond_to?(:id) && record.id.presence && record.class.respond_to?(:find_by)
23
+ end
24
+
25
+ # FIXME: Refactor this method, maybe a rescue block?
26
+ def self.deserializable?(object_hash:)
27
+ valid = [:klass, :record_id].all? do |k|
28
+ object_hash.respond_to?(:key) && object_hash.key?(k) && object_hash[k].presence
29
+ end
30
+ valid && object_hash[:klass].safe_constantize.respond_to?(:find_by)
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,5 @@
1
+ module Martinet
2
+ module Rails
3
+ VERSION = '0.0.1'.freeze
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ require 'warden'
2
+ require 'martinet/rails/version'
3
+ require 'martinet/rails/serializer'
4
+ require 'martinet/rails/railtie' if defined?(Rails)
5
+
6
+ module Martinet
7
+ module Rails
8
+ end
9
+ end
@@ -0,0 +1,33 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'martinet/rails/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'martinet-rails'
8
+ spec.version = Martinet::Rails::VERSION
9
+ spec.authors = ['Tang Rufus']
10
+ spec.email = ['tangrufus@gmail.com']
11
+
12
+ spec.summary = 'Automatically load and include all common Martinet features for a standard Rails environment'
13
+ spec.description = 'Automatically load and include all common Martinet features for a standard Rails environment'
14
+ spec.homepage = 'https://github.com/TangRufus/martinet-rails'
15
+ spec.license = 'MIT'
16
+
17
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
+
19
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ spec.require_paths = 'lib'
21
+
22
+ spec.required_ruby_version = '>= 2.1.10'
23
+
24
+ spec.add_dependency 'martinet', '>= 0.0.4'
25
+
26
+ spec.add_development_dependency 'bundler', '~> 1.11', '>= 1.11.2'
27
+ spec.add_development_dependency 'rake', '~> 11.1', '>= 11.1.2'
28
+ spec.add_development_dependency 'appraisal', '~> 2.1.0'
29
+ spec.add_development_dependency 'minitest', '~> 5.8', '>= 5.8.4'
30
+ spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.5.0'
31
+ spec.add_development_dependency 'activerecord', '>= 4.0.13'
32
+ spec.add_development_dependency 'sqlite3', '~> 1.3', '>= 1.3.11'
33
+ end
metadata ADDED
@@ -0,0 +1,203 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: martinet-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Tang Rufus
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-04-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: martinet
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.0.4
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.0.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.11'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 1.11.2
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '1.11'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.11.2
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '11.1'
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 11.1.2
57
+ type: :development
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '11.1'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 11.1.2
67
+ - !ruby/object:Gem::Dependency
68
+ name: appraisal
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: 2.1.0
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: 2.1.0
81
+ - !ruby/object:Gem::Dependency
82
+ name: minitest
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '5.8'
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 5.8.4
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '5.8'
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: 5.8.4
101
+ - !ruby/object:Gem::Dependency
102
+ name: codeclimate-test-reporter
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - "~>"
106
+ - !ruby/object:Gem::Version
107
+ version: 0.5.0
108
+ type: :development
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - "~>"
113
+ - !ruby/object:Gem::Version
114
+ version: 0.5.0
115
+ - !ruby/object:Gem::Dependency
116
+ name: activerecord
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: 4.0.13
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: 4.0.13
129
+ - !ruby/object:Gem::Dependency
130
+ name: sqlite3
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: '1.3'
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: 1.3.11
139
+ type: :development
140
+ prerelease: false
141
+ version_requirements: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '1.3'
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: 1.3.11
149
+ description: Automatically load and include all common Martinet features for a standard
150
+ Rails environment
151
+ email:
152
+ - tangrufus@gmail.com
153
+ executables: []
154
+ extensions: []
155
+ extra_rdoc_files: []
156
+ files:
157
+ - ".codeclimate.yml"
158
+ - ".gitignore"
159
+ - ".hound.yml"
160
+ - ".rubocop.yml"
161
+ - ".travis.yml"
162
+ - Appraisals
163
+ - CODE_OF_CONDUCT.md
164
+ - Gemfile
165
+ - LICENSE.txt
166
+ - README.md
167
+ - Rakefile
168
+ - gemfiles/activerecord_4_1.gemfile
169
+ - gemfiles/activerecord_4_2.gemfile
170
+ - gemfiles/activerecord_5_0.gemfile
171
+ - gemfiles/github_head.gemfile
172
+ - lib/martinet/rails.rb
173
+ - lib/martinet/rails/railtie.rb
174
+ - lib/martinet/rails/serializer.rb
175
+ - lib/martinet/rails/version.rb
176
+ - martinet-rails.gemspec
177
+ homepage: https://github.com/TangRufus/martinet-rails
178
+ licenses:
179
+ - MIT
180
+ metadata:
181
+ allowed_push_host: https://rubygems.org
182
+ post_install_message:
183
+ rdoc_options: []
184
+ require_paths:
185
+ - lib
186
+ required_ruby_version: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: 2.1.10
191
+ required_rubygems_version: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ requirements: []
197
+ rubyforge_project:
198
+ rubygems_version: 2.6.3
199
+ signing_key:
200
+ specification_version: 4
201
+ summary: Automatically load and include all common Martinet features for a standard
202
+ Rails environment
203
+ test_files: []