restpack_gem 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -28
- data/lib/restpack_gem/tasks.rb +5 -0
- data/lib/restpack_gem/tasks/migrations.rake +35 -0
- data/lib/restpack_gem/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d739dda7a2f43bf3c7c0a0965ff8e13bf9072e71
|
4
|
+
data.tar.gz: 11b0745d6baec11319bf675c84d73496b5fdd32d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a648dc6509e624dba193a1fde5d30bad9e1088f6c62aac4e44daa9ab5bd688f99a434a62d6cf0282608a99e330fa56fa24af99ace598a4c17280167ccc80a2d6
|
7
|
+
data.tar.gz: 28239675bdf1d0d3698e397540f2a101d9f0d73300a82298ffe14cd39275f94466bd036082c8d4dfdf12a31077af65bb93b7453809bbab961bb6b75a9323d3ef
|
data/README.md
CHANGED
@@ -1,29 +1,3 @@
|
|
1
|
-
#
|
1
|
+
# restpack_gem
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
gem 'restpack_gem'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install restpack_gem
|
18
|
-
|
19
|
-
## Usage
|
20
|
-
|
21
|
-
TODO: Write usage instructions here
|
22
|
-
|
23
|
-
## Contributing
|
24
|
-
|
25
|
-
1. Fork it
|
26
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
-
5. Create new Pull Request
|
3
|
+
A set of common rake tasks for all RestPack gems
|
data/lib/restpack_gem/tasks.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
namespace :db do
|
2
|
+
desc "Creates a new migration"
|
3
|
+
task :new_migration, :name do |t, args|
|
4
|
+
name = args[:name] || ENV['name']
|
5
|
+
|
6
|
+
unless name
|
7
|
+
puts "Error: must provide name of migration to generate."
|
8
|
+
puts "For example: rake #{t.name} name=migration_name"
|
9
|
+
abort
|
10
|
+
end
|
11
|
+
|
12
|
+
create_migration(name)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def create_migration(name)
|
17
|
+
FileUtils.mkdir_p 'db/migrate'
|
18
|
+
prefix = Time.now.strftime("%Y%m%d%H%M%S")
|
19
|
+
path = "db/migrate/#{prefix}_#{name}.rb"
|
20
|
+
|
21
|
+
File.open(path, "w") do |f|
|
22
|
+
f.write(
|
23
|
+
%{class #{name.camelize} < ActiveRecord::Migration
|
24
|
+
def up
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
def down
|
29
|
+
|
30
|
+
end
|
31
|
+
end})
|
32
|
+
|
33
|
+
puts "Created #{path}"
|
34
|
+
end
|
35
|
+
end
|
data/lib/restpack_gem/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restpack_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Joyce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- lib/restpack_gem.rb
|
82
82
|
- lib/restpack_gem/tasks.rb
|
83
83
|
- lib/restpack_gem/tasks/gem.rake
|
84
|
+
- lib/restpack_gem/tasks/migrations.rake
|
84
85
|
- lib/restpack_gem/tasks/rspec.rake
|
85
86
|
- lib/restpack_gem/version.rb
|
86
87
|
- restpack_gem.gemspec
|