Skip to content

Commit

Permalink
repackage gem with bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly committed Dec 26, 2013
1 parent 16744f2 commit ec89117
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 82 deletions.
24 changes: 17 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
.bundle/
log/*.log
pkg/
test/dummy/db/*.sqlite3
test/dummy/log/*.log
test/dummy/tmp/
test/dummy/.sass-cache
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
doc/
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
5 changes: 4 additions & 1 deletion Changelog
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# 0.0.5
- repackage gem with bundler

# 0.0.4
- relax rails dependency to support rails 4
- relax rails dependency to support rails 4
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in rails_admin_impersonate.gemspec
gemspec
4 changes: 3 additions & 1 deletion MIT-LICENSE → LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Copyright 2013 YOURNAME
Copyright (c) 2013 Vitaly Kushner

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
27 changes: 20 additions & 7 deletions README.markdown → README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
## RailsAdminImpersonate
# RailsAdminImpersonate

Add an ability to [rails_admin](https://github.com/sferik/rails_admin) to impersonate as any user or actually any member
that is devise authenticatable.

## Installation

Add to your Gemfile:
Add this line to your application's Gemfile:

gem 'rails_admin'
gem 'rails_admin_impersonate'

And then execute:

$ bundle

## Usage

Add to your `config/initializers/rails_admin.rb` an action `impersonate` to actions:

config.actions do
Expand All @@ -30,10 +35,18 @@ Add to your `config/initializers/rails_admin.rb` an action `impersonate` to acti
impersonate
end

You should see home icon and Impersonate link for every user action.
Now restart the application and visit User table in the admin.

You should see home icon and Impersonate link for every model that uses Devise.

## Contributing

This project rocks and uses MIT-LICENSE.
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

#### Copyright
## Copyright

© 2013 [Boris Nadion](mailto:[email protected])
© 2013 [Boris Nadion](mailto:[email protected])
28 changes: 1 addition & 27 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,27 +1 @@
#!/usr/bin/env rake
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
begin
require 'rdoc/task'
rescue LoadError
require 'rdoc/rdoc'
require 'rake/rdoctask'
RDoc::Task = Rake::RDocTask
end

RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'RailsAdminImpersonate'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.markdown')
rdoc.rdoc_files.include('lib/**/*.rb')
end




Bundler::GemHelper.install_tasks

require "bundler/gem_tasks"
2 changes: 0 additions & 2 deletions config/routes.rb

This file was deleted.

7 changes: 3 additions & 4 deletions lib/rails_admin_impersonate.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
require "rails_admin_impersonate/engine"

module RailsAdminImpersonate
end
require "rails_admin_impersonate/version"

module RailsAdmin
module Config
Expand Down Expand Up @@ -39,3 +36,5 @@ class Impersonate < RailsAdmin::Config::Actions::Base
end
end
end

I18n.load_path += Dir.glob(File.expand_path("../../config/locales/*.{rb,yml}", __FILE__))
4 changes: 0 additions & 4 deletions lib/rails_admin_impersonate/engine.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/rails_admin_impersonate/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RailsAdminImpersonate
VERSION = "0.0.4"
VERSION = "0.0.5"
end
4 changes: 0 additions & 4 deletions lib/tasks/rails_admin_impersonate_tasks.rake

This file was deleted.

37 changes: 21 additions & 16 deletions rails_admin_impersonate.gemspec
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
$:.push File.expand_path("../lib", __FILE__)
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'rails_admin_impersonate/version'

# Maintain your gem's version:
require "rails_admin_impersonate/version"
Gem::Specification.new do |spec|
spec.name = "rails_admin_impersonate"
spec.version = RailsAdminImpersonate::VERSION
spec.authors = ["Boris Nadion"]
spec.email = ["[email protected]"]
spec.summary = "Impersonate as a Devise user for rails_admin"
spec.description = "Impersonate as a Devise user for rails_admin"
spec.homepage = "https://github.com/astrails/rails_admin_impersonate"
spec.license = "MIT"

# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "rails_admin_impersonate"
s.version = RailsAdminImpersonate::VERSION
s.authors = ["Boris Nadion"]
s.email = ["[email protected]"]
s.homepage = "https://github.com/astrails/rails_admin_impersonate"
s.summary = "Impersonate as a Devise user for rails_admin"
spec.files = `git ls-files`.split($/)
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.markdown"]
s.license = 'MIT'

s.add_dependency "rails", ">= 3.2.13"
s.add_dependency "rails_admin"
spec.add_dependency "rails", ">= 3.2.13"
spec.add_dependency "rails_admin"
spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
end
8 changes: 0 additions & 8 deletions script/rails

This file was deleted.

0 comments on commit ec89117

Please sign in to comment.