groupify 0.7.1 → 0.7.2

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: e5a7c94016dfb89d80fa168432ac5264715eeb99
4
- data.tar.gz: 76fea4b6d592cdfaf49100193b626229015eb0a9
3
+ metadata.gz: a51b9eb2f098c12c38c0931f70239b4c6dcc69a4
4
+ data.tar.gz: 583b5b0cd264c7d9a47c61d15fd471510b83d6e0
5
5
  SHA512:
6
- metadata.gz: 8f8c9ec44a6fc7d8dfaa51719fb44dabfca72e4b03f1c947bc731ff64674a4299f6f12be1347bb0f29f0b775af12094e9ee7c3de08ecbbab2c22b57ed4e52014
7
- data.tar.gz: 6510cefc1fb9b8dd15d065a89e462ebc4f3cc3d25f8d4e868ea1eca1067ea6f7f61e7c2fbe3067fd9dd2fdb7c6a9e75e667516d61df4d440098dcebddbaca862
6
+ metadata.gz: 9b170ecd8d041eace85389589d8f12cf817aa2ce09c484350661285e1b690f8e679380e484a4a44855a1de9d994c3e1ecee71e20b5577a53b0ba7dc10d09206d
7
+ data.tar.gz: 97e75482a3628024737b26f452febd88f109472b94c8c2e55884f7b6614a789b34cb2ba1da37e3a6cc4f5d1d01438ac71a33cf5e8cbc9c3937c12544bbeebd2e
data/.gitignore CHANGED
@@ -16,4 +16,5 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  /**/*.lock
19
- .idea/
19
+ .idea/
20
+ .ruby-version
data/.travis.yml CHANGED
@@ -8,20 +8,35 @@ env:
8
8
  rvm:
9
9
  - 1.9.3
10
10
  - 2.0.0
11
- - 2.1
12
- - 2.2
11
+ - 2.1.9
12
+ - 2.2.5
13
+ - 2.3.1
13
14
  - jruby-19mode
15
+ - jruby-9.0.5.0
14
16
  - rbx-2
15
17
  gemfile:
16
18
  - gemfiles/rails_3.2.gemfile
17
19
  - gemfiles/rails_4.0.gemfile
18
20
  - gemfiles/rails_4.1.gemfile
19
21
  - gemfiles/rails_4.2.gemfile
22
+ - gemfiles/rails_5.0.gemfile
20
23
  matrix:
21
24
  exclude:
22
- - rvm: 2.2
25
+ - rvm: 1.9.3
26
+ gemfile: gemfiles/rails_5.0.gemfile
27
+ - rvm: jruby-19mode
28
+ gemfile: gemfiles/rails_5.0.gemfile
29
+ - rvm: 2.0.0
30
+ gemfile: gemfiles/rails_5.0.gemfile
31
+ - rvm: 2.1.9
32
+ gemfile: gemfiles/rails_5.0.gemfile
33
+ - rvm: 2.2.5
34
+ gemfile: gemfiles/rails_3.2.gemfile
35
+ - rvm: 2.3.1
23
36
  gemfile: gemfiles/rails_3.2.gemfile
24
37
  allow_failures:
25
38
  - rvm: rbx-2
39
+ - rvm: jruby-9.0.5.0
40
+ gemfile: gemfiles/rails_5.0.gemfile
26
41
  sudo: false
27
42
  cache: bundler
data/Appraisals CHANGED
@@ -19,3 +19,13 @@ appraise "rails-4.2" do
19
19
 
20
20
  gem "mongoid", "~> 4.0"
21
21
  end
22
+
23
+ appraise "rails-5.0" do
24
+ gem 'activerecord', "~> 5.0.0.rc1"
25
+ gem 'activesupport', "~> 5.0.0.rc1"
26
+ gem 'railties', "~> 5.0.0.rc1"
27
+
28
+ gem 'combustion', '0.5.4'
29
+
30
+ gem 'mongoid', github: 'mongodb/mongoid', ref: '7c2ff52a0c5292b8e6bf3a9a29bbb19abae3dd5f'
31
+ end
data/README.md CHANGED
@@ -9,12 +9,12 @@ model? Use named groups instead to add members to named groups such as
9
9
  ## Compatibility
10
10
 
11
11
  The following ORMs are supported:
12
- * ActiveRecord 3.2, 4.1.x, 4.2.x
13
- * Mongoid 3.1, 4.0
12
+ * ActiveRecord 3.2, 4.1, 4.2, 5.0
13
+ * Mongoid 3.1, 4.0+, 5.0+, 6
14
14
 
15
15
  The following Rubies are supported:
16
- * MRI Ruby 1.9.3, 2.0.x, 2.1.x, 2.2.x
17
- * JRuby (1.9 mode)
16
+ * MRI Ruby 1.9.3, 2.0, 2.1, 2.2, 2.3
17
+ * JRuby 1.7, 9000
18
18
 
19
19
  The following databases are supported:
20
20
  * MySQL
@@ -0,0 +1,32 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.0.0.rc1"
6
+ gem "activesupport", "~> 5.0.0.rc1"
7
+ gem "railties", "~> 5.0.0.rc1"
8
+ gem "combustion", "0.5.4"
9
+ gem "mongoid", :github => "mongodb/mongoid", :ref => "7c2ff52a0c5292b8e6bf3a9a29bbb19abae3dd5f"
10
+
11
+ group :development do
12
+ gem "pry"
13
+ end
14
+
15
+ group :test do
16
+ gem "coveralls", :require => false
17
+ end
18
+
19
+ platforms :jruby do
20
+ gem "activerecord-jdbcsqlite3-adapter"
21
+ gem "activerecord-jdbcmysql-adapter"
22
+ gem "jdbc-mysql"
23
+ gem "activerecord-jdbcpostgresql-adapter"
24
+ end
25
+
26
+ platforms :ruby do
27
+ gem "sqlite3"
28
+ gem "mysql2", "~> 0.3.11"
29
+ gem "pg"
30
+ end
31
+
32
+ gemspec :path => "../"
data/groupify.gemspec CHANGED
@@ -19,12 +19,12 @@ Gem::Specification.new do |gem|
19
19
  gem.required_ruby_version = ">= 1.9.3"
20
20
 
21
21
  gem.add_development_dependency "mongoid", ">= 3.1"
22
- gem.add_development_dependency "activerecord", ">= 3.2", "< 5"
22
+ gem.add_development_dependency "activerecord", ">= 3.2", "< 5.1"
23
23
 
24
24
  gem.add_development_dependency "rspec", ">= 3"
25
25
 
26
- gem.add_development_dependency "database_cleaner", "~> 1.3.0"
27
- gem.add_development_dependency "combustion", ">= 0.5.0"
26
+ gem.add_development_dependency "database_cleaner", "~> 1.5.3"
27
+ gem.add_development_dependency "combustion", ">= 0.5.4"
28
28
  gem.add_development_dependency "appraisal"
29
29
 
30
30
  gem.add_development_dependency "github_changelog_generator"
@@ -32,14 +32,14 @@ module Groupify
32
32
  members = args.flatten
33
33
  return unless members.present?
34
34
 
35
- clear_association_cache
35
+ __send__(:clear_association_cache)
36
36
 
37
37
  members.each do |member|
38
38
  member.groups << self unless member.groups.include?(self)
39
39
  if membership_type
40
40
  member.group_memberships.where(group_id: id, group_type: self.class.model_name.to_s, membership_type: membership_type).first_or_create!
41
41
  end
42
- member.clear_association_cache
42
+ member.__send__(:clear_association_cache)
43
43
  end
44
44
  end
45
45
 
@@ -1,3 +1,3 @@
1
1
  module Groupify
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
data/spec/mongoid_spec.rb CHANGED
@@ -17,17 +17,20 @@ end
17
17
  require 'mongoid'
18
18
  puts "Mongoid version #{Mongoid::VERSION}"
19
19
 
20
- # Load mongoid config
21
- #Mongoid.load!('./spec/groupify/mongoid.yml', :test)
22
- Mongoid::Config.sessions = {
20
+ client_configuration = {
23
21
  default: {
24
22
  database: 'groupify',
25
23
  hosts: [ "localhost:27017" ]
26
24
  }
27
25
  }
28
26
 
29
- if DEBUG
30
- Moped.logger = Logger.new(STDOUT)
27
+ # Load mongoid config
28
+ if Mongoid::VERSION < "5"
29
+ Mongoid::Config.sessions = client_configuration
30
+ Moped.logger = Logger.new(STDOUT) if DEBUG
31
+ else
32
+ Mongoid::Config.log_level = :debug if DEBUG
33
+ Mongoid::Config.load_configuration(clients: client_configuration)
31
34
  end
32
35
 
33
36
  require 'groupify/adapter/mongoid'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groupify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - dwbutler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2016-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '3.2'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '5'
36
+ version: '5.1'
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '3.2'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '5'
46
+ version: '5.1'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -64,28 +64,28 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 1.3.0
67
+ version: 1.5.3
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: 1.3.0
74
+ version: 1.5.3
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: combustion
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: 0.5.0
81
+ version: 0.5.4
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: 0.5.0
88
+ version: 0.5.4
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: appraisal
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -135,6 +135,8 @@ files:
135
135
  - gemfiles/rails_4.0.gemfile
136
136
  - gemfiles/rails_4.1.gemfile
137
137
  - gemfiles/rails_4.2.gemfile
138
+ - gemfiles/rails_5.0.gemfile
139
+ - gemfiles/rails_5.0.gemfile.lock
138
140
  - groupify.gemspec
139
141
  - lib/generators/groupify/active_record/initializer/initializer_generator.rb
140
142
  - lib/generators/groupify/active_record/initializer/templates/initializer.rb
@@ -194,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
196
  version: '0'
195
197
  requirements: []
196
198
  rubyforge_project:
197
- rubygems_version: 2.2.2
199
+ rubygems_version: 2.5.1
198
200
  signing_key:
199
201
  specification_version: 4
200
202
  summary: Group functionality for Rails