jay_z 0.0.2 → 0.0.3

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/jay_z.gemspec CHANGED
@@ -13,7 +13,9 @@ Gem::Specification.new do |s|
13
13
 
14
14
  s.rubyforge_project = "jay_z"
15
15
 
16
- s.files = `git ls-files`.split("\n")
16
+ example_files = `git ls-files -- example`.split("\n")
17
+ no_gem_files = example_files + %w[.gitignore .rvmrc]
18
+ s.files = `git ls-files`.split("\n") - no_gem_files
17
19
  s.test_files = `git ls-files -- spec/*`.split("\n")
18
20
  s.executables = `git ls-files -- bin/*`.split("\n").map do |f|
19
21
  File.basename(f)
data/lib/jay_z/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module JayZ
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jay_z
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -20,11 +20,8 @@ extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
22
  - .gemtest
23
- - .gitignore
24
- - .rvmrc
25
23
  - Gemfile
26
24
  - Rakefile
27
- - example/blog.rb
28
25
  - jay_z.gemspec
29
26
  - lib/jay_z.rb
30
27
  - lib/jay_z/blueprint.rb
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use 1.9.2-p290@jay_z --create
data/example/blog.rb DELETED
@@ -1,66 +0,0 @@
1
- # encoding: utf-8
2
- $LOAD_PATH << File.dirname(__FILE__) + "../../lib"
3
- require 'jay_z'
4
-
5
- module JayZ
6
- class Post < Blueprint
7
- default do
8
- author { Author.make.save }
9
- body { "I am a default post body" }
10
- end
11
-
12
- set(:video) do
13
- author { Author.make(:name => 'Anders defined in video').save }
14
- url { 'http://www.youtube.com/watch?v=g5950v0kTJg' }
15
- end
16
- end
17
-
18
- class Author < Blueprint
19
- default do
20
- name { 'Anders Törnqvist' }
21
- end
22
- end
23
- end
24
-
25
- class Post
26
- extend JayZ
27
- attr_accessor :author
28
- attr_accessor :body
29
- attr_accessor :url
30
- def save; 'save in post called'; end
31
- def save!; self; end
32
- end
33
-
34
- class Author
35
- extend JayZ
36
- attr_accessor :name
37
- def save; self; end
38
- end
39
-
40
- puts "\nPost.make \n"
41
- p Post.make # => <JayZ::Post:0x007ffb9b838c10
42
- # @object=#<Post:0x007ffb9b8389b8
43
- # @author=#<Author:0x007ffb9b8386e8
44
- # @name="Anders Törnqvist">,
45
- # @body="I am a default post body">>
46
-
47
- puts "\nPost.make(:video) \n"
48
- p Post.make(:video) # => <JayZ::Post:0x007fd329837f80
49
- # @object=#<Post:0x007fd329837dc8
50
- # @author=#<Author:0x007fd329837ad0
51
- # @name="Anders defined in video">,
52
- # @body="I am a default post body",
53
- # @url="http://www.youtube.com/watch?v=g5950v0kTJg">>
54
-
55
-
56
- puts "\npost = Post.make.save! \n"
57
- post = Post.make.save!
58
- p post.author # => <Author:0x007fc70a838d70 @name="Anders Törnqvist">
59
- p post.body # => "I am a default post body"
60
- p post.url # => nil
61
-
62
- puts "\npost = Post.make(:video).save! \n"
63
- post = Post.make(:video).save!
64
- p post.author # => <Author:0x007ff669037db8 @name="Anders defined in video">
65
- p post.body # => "I am a default post body"
66
- p post.url # => "http://www.youtube.com/watch?v=g5950v0kTJg"