rails-console-pry 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Ian Yang
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,34 @@
1
+ # rails-console-pry
2
+
3
+ Run Rails 3 console using [pry][] without adding it to Gemfile.
4
+
5
+ Use `-r` to add global gems before loading `Bundler`, e.g., run it in Rails root directory:
6
+
7
+ rails-console-pry -r pry-doc -r awesome_print
8
+
9
+ Or using production environment:
10
+
11
+ rails-console-pry production -r pry-doc -r awesome_print
12
+
13
+ See usage by `rails-console-pry -h`.
14
+
15
+ It is recommended to add an alias to load your favorite pry plugins:
16
+
17
+ alias rpry="rails-console-pry -r pry-doc -r awesome_print"
18
+
19
+ == Contributing to rails-console-pry
20
+
21
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
22
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
23
+ * Fork the project.
24
+ * Start a feature/bugfix branch.
25
+ * Commit and push until you are happy with your contribution.
26
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
27
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
28
+
29
+ == Copyright
30
+
31
+ Copyright (c) 2012 Ian Yang. See LICENSE.txt for
32
+ further details.
33
+
34
+ [pry]: http://pry.github.com/
@@ -0,0 +1,21 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'rake'
5
+
6
+ require 'jeweler'
7
+ Jeweler::Tasks.new do |gem|
8
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
9
+ gem.name = "rails-console-pry"
10
+ gem.homepage = "http://github.com/doitian/rails-console-pry"
11
+ gem.license = "MIT"
12
+ gem.summary = %Q{inject pry into rails console}
13
+ gem.description = %Q{run rails console using rails without adding it to Gemfile}
14
+ gem.email = "me@iany.me"
15
+ gem.authors = ["Ian Yang"]
16
+ gem.add_runtime_dependency "pry", ">= 0"
17
+ gem.executables = ['rails-console-pry']
18
+ end
19
+ Jeweler::RubygemsDotOrgTasks.new
20
+
21
+ task :default => 'gemspec'
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'pry'
5
+
6
+ remaining_args = []
7
+ require_next = false
8
+ ARGV.each do |arg|
9
+ if ['-r', '--require'].include?(arg)
10
+ require_next = true
11
+ elsif require_next
12
+ require arg
13
+ require_next = false
14
+ else
15
+ remaining_args << arg
16
+ end
17
+ end
18
+
19
+ ARGV.replace remaining_args
20
+
21
+ if ARGV.first && !ARGV.first.index("-") && env = ARGV.shift
22
+ ENV['RAILS_ENV'] = %w(production development test).detect {|e| e =~ /^#{env}/} || env
23
+ end
24
+
25
+ ARGV.unshift "console"
26
+
27
+ APP_PATH = File.expand_path('config/application')
28
+ require APP_PATH
29
+
30
+ module Rails
31
+ class Console
32
+ IRB = ::Pry
33
+ end
34
+ end
35
+
36
+ if ARGV.include?('-h') || ARGV.include?('--help')
37
+ at_exit do
38
+ opts = OptionParser.new { |opt| opt.on '-r', '--require', 'require a Ruby script at startup' }
39
+ puts opts.to_s.lines.to_a[1..-1].join
40
+ end
41
+ end
42
+
43
+ require 'rails/commands'
@@ -0,0 +1,46 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "rails-console-pry"
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Ian Yang"]
12
+ s.date = "2012-04-08"
13
+ s.description = "run rails console using rails without adding it to Gemfile"
14
+ s.email = "me@iany.me"
15
+ s.executables = ["rails-console-pry"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE.txt",
18
+ "README.md"
19
+ ]
20
+ s.files = [
21
+ "LICENSE.txt",
22
+ "README.md",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "bin/rails-console-pry",
26
+ "rails-console-pry.gemspec"
27
+ ]
28
+ s.homepage = "http://github.com/doitian/rails-console-pry"
29
+ s.licenses = ["MIT"]
30
+ s.require_paths = ["lib"]
31
+ s.rubygems_version = "1.8.11"
32
+ s.summary = "inject pry into rails console"
33
+
34
+ if s.respond_to? :specification_version then
35
+ s.specification_version = 3
36
+
37
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
38
+ s.add_runtime_dependency(%q<pry>, [">= 0"])
39
+ else
40
+ s.add_dependency(%q<pry>, [">= 0"])
41
+ end
42
+ else
43
+ s.add_dependency(%q<pry>, [">= 0"])
44
+ end
45
+ end
46
+
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails-console-pry
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Ian Yang
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-04-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: pry
16
+ requirement: &19946380 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *19946380
25
+ description: run rails console using rails without adding it to Gemfile
26
+ email: me@iany.me
27
+ executables:
28
+ - rails-console-pry
29
+ extensions: []
30
+ extra_rdoc_files:
31
+ - LICENSE.txt
32
+ - README.md
33
+ files:
34
+ - LICENSE.txt
35
+ - README.md
36
+ - Rakefile
37
+ - VERSION
38
+ - bin/rails-console-pry
39
+ - rails-console-pry.gemspec
40
+ homepage: http://github.com/doitian/rails-console-pry
41
+ licenses:
42
+ - MIT
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project:
61
+ rubygems_version: 1.8.11
62
+ signing_key:
63
+ specification_version: 3
64
+ summary: inject pry into rails console
65
+ test_files: []