Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gems #65

Merged
merged 2 commits into from
Jan 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ gemspec
# gem 'byebug', group: [:development, :test]

group :development, :test do
gem 'sqlite3', '1.3.12'
gem 'rubocop', '0.43.0'
gem 'database_cleaner', '1.5.3'
gem 'factory_girl_rails', '4.8.0'
gem 'ffaker', '2.4.0'
gem 'pry-rails', '0.3.4'
gem 'shoulda-matchers', '3.1.1'
gem 'rails', '5.0.1'
gem 'rspec-rails', '3.5.2'
gem 'factory_girl_rails', '4.7.0'
gem 'ffaker', '2.2.0'
gem 'database_cleaner', '1.5.3'
gem 'rubocop', '0.46.0'
gem 'shoulda-matchers', '3.1.1'
gem 'sqlite3', '1.3.13'
gem 'tqdm', '0.3.0'
gem 'rails', '5.0.0.1'
end

gem 'codeclimate-test-reporter', '1.0.4', group: :test
gem 'simplecov', '0.12.0', group: :test
gem 'codeclimate-test-reporter', '1.0.0', group: :test
121 changes: 61 additions & 60 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,47 @@ PATH
active_record_union (= 1.2.0)
activerecord (>= 4.2.7.1)
closure_tree (= 6.2.0)
configurations (= 2.2.1)
configurations (= 2.2.2)
tqdm (= 0.3.0)

GEM
remote: https://rubygems.org/
specs:
actioncable (5.0.0.1)
actionpack (= 5.0.0.1)
actioncable (5.0.1)
actionpack (= 5.0.1)
nio4r (~> 1.2)
websocket-driver (~> 0.6.1)
actionmailer (5.0.0.1)
actionpack (= 5.0.0.1)
actionview (= 5.0.0.1)
activejob (= 5.0.0.1)
actionmailer (5.0.1)
actionpack (= 5.0.1)
actionview (= 5.0.1)
activejob (= 5.0.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.0.0.1)
actionview (= 5.0.0.1)
activesupport (= 5.0.0.1)
actionpack (5.0.1)
actionview (= 5.0.1)
activesupport (= 5.0.1)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.0.1)
activesupport (= 5.0.0.1)
actionview (5.0.1)
activesupport (= 5.0.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
active_record_union (1.2.0)
activerecord (>= 4.0)
activejob (5.0.0.1)
activesupport (= 5.0.0.1)
activejob (5.0.1)
activesupport (= 5.0.1)
globalid (>= 0.3.6)
activemodel (5.0.0.1)
activesupport (= 5.0.0.1)
activerecord (5.0.0.1)
activemodel (= 5.0.0.1)
activesupport (= 5.0.0.1)
activemodel (5.0.1)
activesupport (= 5.0.1)
activerecord (5.0.1)
activemodel (= 5.0.1)
activesupport (= 5.0.1)
arel (~> 7.0)
activesupport (5.0.0.1)
activesupport (5.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
Expand All @@ -56,20 +56,21 @@ GEM
closure_tree (6.2.0)
activerecord (>= 4.1.0)
with_advisory_lock (>= 3.0.0)
codeclimate-test-reporter (1.0.0)
codeclimate-test-reporter (1.0.4)
simplecov
coderay (1.1.1)
concurrent-ruby (1.0.2)
configurations (2.2.1)
concurrent-ruby (1.0.4)
configurations (2.2.2)
database_cleaner (1.5.3)
diff-lcs (1.2.5)
docile (1.1.5)
erubis (2.7.0)
factory_girl (4.7.0)
factory_girl (4.8.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.7.0)
factory_girl (~> 4.7.0)
factory_girl_rails (4.8.0)
factory_girl (~> 4.8.0)
railties (>= 3.0.0)
ffaker (2.2.0)
ffaker (2.4.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
i18n (0.7.0)
Expand All @@ -83,11 +84,11 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.1)
minitest (5.10.1)
nio4r (1.2.1)
nokogiri (1.6.8.1)
nokogiri (1.7.0.1)
mini_portile2 (~> 2.1.0)
parser (2.3.1.4)
parser (2.3.3.1)
ast (~> 2.2)
powerpack (0.1.1)
pry (0.10.4)
Expand All @@ -99,31 +100,31 @@ GEM
rack (2.0.1)
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.0.1)
actioncable (= 5.0.0.1)
actionmailer (= 5.0.0.1)
actionpack (= 5.0.0.1)
actionview (= 5.0.0.1)
activejob (= 5.0.0.1)
activemodel (= 5.0.0.1)
activerecord (= 5.0.0.1)
activesupport (= 5.0.0.1)
rails (5.0.1)
actioncable (= 5.0.1)
actionmailer (= 5.0.1)
actionpack (= 5.0.1)
actionview (= 5.0.1)
activejob (= 5.0.1)
activemodel (= 5.0.1)
activerecord (= 5.0.1)
activesupport (= 5.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.0.1)
railties (= 5.0.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.1)
rails-dom-testing (2.0.2)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6.0)
nokogiri (~> 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.0.0.1)
actionpack (= 5.0.0.1)
activesupport (= 5.0.0.1)
railties (5.0.1)
actionpack (= 5.0.1)
activesupport (= 5.0.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.1.0)
rake (11.3.0)
rainbow (2.2.1)
rake (12.0.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
Expand All @@ -145,7 +146,7 @@ GEM
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rubocop (0.43.0)
rubocop (0.46.0)
parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
Expand All @@ -160,20 +161,20 @@ GEM
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
slop (3.6.0)
sprockets (3.7.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.12)
thor (0.19.1)
sqlite3 (1.3.13)
thor (0.19.4)
thread_safe (0.3.5)
tqdm (0.3.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
unicode-display_width (1.1.1)
unicode-display_width (1.1.2)
websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
Expand All @@ -186,24 +187,24 @@ PLATFORMS

DEPENDENCIES
bundler (~> 1.12)
codeclimate-test-reporter (= 1.0.0)
codeclimate-test-reporter (= 1.0.4)
database_cleaner (= 1.5.3)
factory_girl_rails (= 4.7.0)
ffaker (= 2.2.0)
factory_girl_rails (= 4.8.0)
ffaker (= 2.4.0)
monarchy!
pry-rails (= 0.3.4)
rails (= 5.0.0.1)
rake (~> 11.3)
rails (= 5.0.1)
rake (~> 12.0)
rspec (= 3.5.0)
rspec-rails (= 3.5.2)
rubocop (= 0.43.0)
rubocop (= 0.46.0)
shoulda-matchers (= 3.1.1)
simplecov (= 0.12.0)
sqlite3 (= 1.3.12)
sqlite3 (= 1.3.13)
tqdm (= 0.3.0)

RUBY VERSION
ruby 2.3.1p112

BUNDLED WITH
1.13.6
1.13.7
4 changes: 3 additions & 1 deletion lib/monarchy/acts_as_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ def children=(array)
end

def ensure_hierarchy(force = false)
return nil unless self.class.automatic_hierarchy || force

self.hierarchy ||= Monarchy.hierarchy_class.create(
resource: self,
parent: parent.try(:hierarchy),
children: hierarchies_for(children)
) if self.class.automatic_hierarchy || force
)
end

private
Expand Down
4 changes: 2 additions & 2 deletions lib/monarchy/acts_as_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ def revoking_role(role_name, resource, strategy = nil)
def revoking_last_role(role, resource, strategy)
case strategy
when :revoke_access
return revoke_access(resource)
revoke_access(resource)
when :revoke_member
return member_for(resource).delete
member_for(resource).delete
else
default_role = Monarchy::Validators.default_role?(resource, role)
raise Monarchy::Exceptions::RoleNotRevokable if default_role
Expand Down
4 changes: 2 additions & 2 deletions monarchy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ Gem::Specification.new do |s|

s.add_dependency 'activerecord', '>=4.2.7.1'
s.add_dependency 'closure_tree', '6.2.0'
s.add_dependency 'configurations', '2.2.1'
s.add_dependency 'configurations', '2.2.2'
s.add_dependency 'active_record_union', '1.2.0'
s.add_dependency 'tqdm', '0.3.0'

s.add_development_dependency 'bundler', '~> 1.12'
s.add_development_dependency 'rake', '~> 11.3'
s.add_development_dependency 'rake', '~> 12.0'
s.add_development_dependency 'rspec', '3.5.0'
end
2 changes: 1 addition & 1 deletion spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
it { is_expected.to eq([manager_role, member_role]) }
end

context "sort roles by name" do
context 'sort roles by name' do
let!(:manager_role) { create(:role, name: :zzz, level: 2, inherited_role: owner_role) }
let!(:memo_member) { create(:member, user: user, hierarchy: memo.hierarchy, roles: [manager_role]) }
let!(:project_member) { create(:member, user: user, hierarchy: project.hierarchy, roles: [member_role]) }
Expand Down