sampler 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ec71e9e93a26fb3368d3fb6d916f438a8b651e8d
4
+ data.tar.gz: 6bea6a684ebf182f1aa1176b90054e3d7d60426f
5
+ SHA512:
6
+ metadata.gz: c384cc265b05e72a3c4f98acbb71e0e34cc0a7e40b286ce0b05d0cb4e6515a00948fd90fa646e6e88b478d9fd3017ad81cad6ec1f3509e4b8485c7f74a15a4a7
7
+ data.tar.gz: a4173112d8db939108e091e2151689492a951445cb51fe2c7b784c4120ff10b9f3dab05a41d9cf9b6e854f514a48f3131b4de42d756eecceab312285a7f7d941
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Cory Kaufman-Schofield
1
+ Copyright (c) 2012-2013 Cory Kaufman-Schofield
2
2
 
3
3
  MIT License
4
4
 
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
19
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
21
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Sampler
2
2
 
3
+ Local development is a lot more fun when your app has some real data to work with. Sampler provides a convention similar to seeds.rb where you set up sample data in db/samples.rb and then run it whenever you want a fresh, pristine set of data to work with.
4
+
3
5
  ## Installation
4
6
 
5
7
  Add this line to your application's Gemfile:
@@ -13,13 +15,19 @@ And then execute:
13
15
  Or install it yourself as:
14
16
 
15
17
  $ gem install sampler
16
-
18
+
17
19
  To generate a default samples.rb file and an initializer, run:
18
20
 
19
21
  $ rails generate sampler:install
20
22
 
21
23
  This will create db/samples.rb and config/initializers/sampler.rb
22
24
 
25
+ ## Sample data
26
+
27
+ Add your sample data to db/samples.rb. Say you were writing a grading app, you might want an admin user (Albus Dumbledore), a TA/GSI (Percy Weasley), students (Harry Potter, Ron Weasley, Hermione Granger), terms, classes (Defense Against the Dark Arts), assignments, grades, etc. If you need it to properly run the app and do all the normal things users would do with your app, it's a good candidate to go in your samples.rb.
28
+
29
+ What isn't a good candidate for samples.rb? Data that you need in production to bootstrap your app should go in seeds.rb. Actual user data probably shouldn't go in samples.rb, nor any sensitive information. Take this opportunity to pour some imagination into your app! Have fun with it, I promise it makes local development and testing way more enjoyable.
30
+
23
31
  ## Usage
24
32
 
25
33
  WARNING: The following command will drop your current database and
@@ -31,7 +39,8 @@ if you're sure there's nothing in your database you want to keep.
31
39
  ## Contributing
32
40
 
33
41
  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
42
+ 1. Create a feature branch (git checkout -b my-new-feature)
43
+ 1. Stage changes (git add -p)
44
+ 1. Commit your changes (git commit)
45
+ 1. Push to Github (git push -u origin my-new-feature)
46
+ 1. Create new Pull Request
data/Rakefile CHANGED
@@ -1,8 +1 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new
5
-
6
- task :default => :spec
7
- task :test => :spec
8
-
1
+ require 'bundler/gem_tasks'
@@ -1,3 +1,3 @@
1
1
  module Sampler
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  namespace :db do
2
- task :sample => ['environment','db:ensure_environment','db:drop','db:setup'] do
2
+ task :sample => ['environment', 'db:ensure_environment', 'db:setup'] do
3
3
  'db/samples.rb'.tap do |sample_file|
4
4
  load(sample_file) if File.exists?(sample_file)
5
5
  end
data/sampler.gemspec CHANGED
@@ -4,19 +4,17 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'sampler/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
7
- gem.name = "sampler"
8
- gem.version = Sampler::VERSION
9
- gem.authors = ["Cory Kaufman-Schofield"]
10
- gem.email = ["cory@corykaufman.com"]
11
- gem.description = %q{Set up your app with sample data using rake db:sample}
12
- gem.summary = %q{Set up your app with sample data}
13
- gem.homepage = "http://github.com/allspiritseve/sampler"
7
+ gem.name = 'sampler'
8
+ gem.version = Sampler::VERSION
9
+ gem.authors = ['Cory Kaufman-Schofield']
10
+ gem.email = ['cory@corykaufman.com']
11
+ gem.summary = %q{No more foobar! Run your app locally with *real* sample data}
12
+ gem.homepage = 'http://github.com/allspiritseve/sampler'
14
13
 
15
14
  gem.files = `git ls-files`.split($/)
16
15
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
16
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ["lib"]
17
+ gem.require_paths = ['lib']
19
18
 
20
19
  gem.add_development_dependency 'rake'
21
- gem.add_development_dependency 'rspec'
22
20
  end
metadata CHANGED
@@ -1,49 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sampler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Cory Kaufman-Schofield
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-09-21 00:00:00.000000000 Z
11
+ date: 2013-07-06 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
- - !ruby/object:Gem::Dependency
31
- name: rspec
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :development
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: Set up your app with sample data using rake db:sample
27
+ description:
47
28
  email:
48
29
  - cory@corykaufman.com
49
30
  executables: []
@@ -64,32 +45,27 @@ files:
64
45
  - lib/sampler/version.rb
65
46
  - lib/tasks/db/sample.rake
66
47
  - sampler.gemspec
67
- - spec/lib/sampler_spec.rb
68
- - spec/spec_helper.rb
69
48
  homepage: http://github.com/allspiritseve/sampler
70
49
  licenses: []
50
+ metadata: {}
71
51
  post_install_message:
72
52
  rdoc_options: []
73
53
  require_paths:
74
54
  - lib
75
55
  required_ruby_version: !ruby/object:Gem::Requirement
76
- none: false
77
56
  requirements:
78
- - - ! '>='
57
+ - - '>='
79
58
  - !ruby/object:Gem::Version
80
59
  version: '0'
81
60
  required_rubygems_version: !ruby/object:Gem::Requirement
82
- none: false
83
61
  requirements:
84
- - - ! '>='
62
+ - - '>='
85
63
  - !ruby/object:Gem::Version
86
64
  version: '0'
87
65
  requirements: []
88
66
  rubyforge_project:
89
- rubygems_version: 1.8.24
67
+ rubygems_version: 2.0.0
90
68
  signing_key:
91
- specification_version: 3
92
- summary: Set up your app with sample data
93
- test_files:
94
- - spec/lib/sampler_spec.rb
95
- - spec/spec_helper.rb
69
+ specification_version: 4
70
+ summary: No more foobar! Run your app locally with *real* sample data
71
+ test_files: []
@@ -1,5 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Sampler do
4
- pending "Write test here..."
5
- end
data/spec/spec_helper.rb DELETED
@@ -1 +0,0 @@
1
- require 'sampler'