railsless-console 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.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/README.md +53 -0
- data/Rakefile +1 -0
- data/lib/railsless/console.rb +7 -0
- data/lib/railsless/console/task.rake +26 -0
- data/lib/railsless/console/version.rb +5 -0
- data/railsless-console.gemspec +23 -0
- metadata +93 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# Railsless-Console
|
2
|
+
|
3
|
+
Provides a Rails-like console via Rake.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'railsless-console'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install railsless-console
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Open up your `Rakefile` and add:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'railsless/console/task.rake'
|
25
|
+
```
|
26
|
+
|
27
|
+
To use, run `rake console` (or `rake c`).
|
28
|
+
|
29
|
+
This will fire up IRB (or Pry, if it's installed), and will optionally run the `:environment` task, if it's defined.
|
30
|
+
|
31
|
+
## Contributing
|
32
|
+
|
33
|
+
1. Fork it
|
34
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
35
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
36
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
37
|
+
5. Create new Pull Request
|
38
|
+
|
39
|
+
## License
|
40
|
+
|
41
|
+
Copyright 2013, Rob Howard
|
42
|
+
|
43
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
44
|
+
you may not use this file except in compliance with the License.
|
45
|
+
You may obtain a copy of the License at
|
46
|
+
|
47
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
48
|
+
|
49
|
+
Unless required by applicable law or agreed to in writing, software
|
50
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
51
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
52
|
+
See the License for the specific language governing permissions and
|
53
|
+
limitations under the License.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Does the environment task exist? (eg. emulating rails)
|
2
|
+
unless Rake::Task.task_defined? 'environment'
|
3
|
+
task :environment
|
4
|
+
end
|
5
|
+
|
6
|
+
task :console => :environment do
|
7
|
+
# Attempt to load Pry
|
8
|
+
pry = begin
|
9
|
+
require 'pry'
|
10
|
+
TOPLEVEL_BINDING.pry
|
11
|
+
rescue LoadError
|
12
|
+
nil
|
13
|
+
end
|
14
|
+
|
15
|
+
# Fall back to IRB
|
16
|
+
unless pry
|
17
|
+
require 'irb'
|
18
|
+
ARGV.clear # ... otherwise all script parameters get passed to IRB.
|
19
|
+
IRB.start
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# Shortcut
|
24
|
+
unless Rake::Task.task_defined? 'c'
|
25
|
+
task :c => :console
|
26
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'railsless/console/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "railsless-console"
|
8
|
+
spec.version = Railsless::Console::VERSION
|
9
|
+
spec.authors = ["Rob Howard"]
|
10
|
+
spec.email = ["rob@robhoward.id.au"]
|
11
|
+
spec.description = %q{Provides a Rails-like console via Rake.}
|
12
|
+
spec.summary = %q{Provides a Rails-like console via Rake. Puts "require 'railsless/console/task'" in your Rakefile and then run "rake console".}
|
13
|
+
spec.homepage = "https://github.com/damncabbage/railsless-console"
|
14
|
+
spec.license = "Apache License, Version 2.0"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_dependency "rake"
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: railsless-console
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Rob Howard
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-11-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
description: Provides a Rails-like console via Rake.
|
47
|
+
email:
|
48
|
+
- rob@robhoward.id.au
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- .gitignore
|
54
|
+
- Gemfile
|
55
|
+
- README.md
|
56
|
+
- Rakefile
|
57
|
+
- lib/railsless/console.rb
|
58
|
+
- lib/railsless/console/task.rake
|
59
|
+
- lib/railsless/console/version.rb
|
60
|
+
- railsless-console.gemspec
|
61
|
+
homepage: https://github.com/damncabbage/railsless-console
|
62
|
+
licenses:
|
63
|
+
- Apache License, Version 2.0
|
64
|
+
post_install_message:
|
65
|
+
rdoc_options: []
|
66
|
+
require_paths:
|
67
|
+
- lib
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
hash: 1758270617746159739
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
segments:
|
84
|
+
- 0
|
85
|
+
hash: 1758270617746159739
|
86
|
+
requirements: []
|
87
|
+
rubyforge_project:
|
88
|
+
rubygems_version: 1.8.24
|
89
|
+
signing_key:
|
90
|
+
specification_version: 3
|
91
|
+
summary: Provides a Rails-like console via Rake. Puts "require 'railsless/console/task'"
|
92
|
+
in your Rakefile and then run "rake console".
|
93
|
+
test_files: []
|