hack_cards 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35a0dc7eefbf40ce1b79c70f71e526708f6becc6
4
- data.tar.gz: 0dad31a3f91f1765ef90eaa2f2476dfb74964576
3
+ metadata.gz: a0c1944814693f49827ee87820ebf6684274776f
4
+ data.tar.gz: 4261cf3646897b53178b81544daaf74ec63f980d
5
5
  SHA512:
6
- metadata.gz: b4c3cf866a7432acda3e300ebda673caa1f0b0607e1f6accdf8dbedeec394cbaefd19fb413a942a49ef7fdc1eb4dcecd259ce89aefebd1d44946b3abea7b0920
7
- data.tar.gz: 3027655e520e658d00ddc3fffb86f7d18cfccb9cdf2d989ede82a97b62d957d6b4743dd37a0f5c19c63d4a0139e9edc1ff29c53a9a790bfc6bc9d61f8cdd45d6
6
+ metadata.gz: 7d6d3cc46f7a600a1b467331d3402312bd0d711cfe9e5db97fba0eb8932226f1cda77787df4522c5445e38d8d7a917cc0cc8318fe34aaa1c1ac7407e77266501
7
+ data.tar.gz: c50613640c17915211b667f378311d6e4089a2c454a29f25d6a69e7f3a649dd64852381d19bf97fef7d0e5133f72bac0d7bcd7b643e4f3669f1ffb9436a8fecb
data/hack_cards.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["michaelbyrdsemail@gmail.com"]
11
11
  spec.summary = %q{A gem to help create media cards.}
12
12
  spec.description = %q{}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/michaelbyrd/hack_cards"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Explain the generator
3
+
4
+ Example:
5
+ rails generate hack_cards Thing
6
+
7
+ This will create:
8
+ what/will/it/create
@@ -0,0 +1,20 @@
1
+ # class HackCardsGenerator < Rails::Generators::NamedBase don't take in a name
2
+ # parameter
3
+
4
+ # railscast 218
5
+
6
+ class HackCardsGenerator < Rails::Generators::Base
7
+ source_root File.expand_path('../templates', __FILE__)
8
+ argument :layout_name, type: :string, default: "cards"
9
+
10
+ # all public methods inside a generator will be executed when you call the
11
+ # generator
12
+
13
+ def generate_stylesheets
14
+ copy_file "stylesheet.scss", "app/assets/stylsheets/#{layout_name}.scss"
15
+ end
16
+
17
+ def generate_partials
18
+ template "card.html.erb", "app/views/layouts/card.html.erb"
19
+ end
20
+ end
@@ -0,0 +1,2 @@
1
+ This is 2 + 2, <%= 2 + 4 %><br>
2
+ this is erb <%%= 2 + 2 %>
@@ -0,0 +1,3 @@
1
+ .test{
2
+ color: red;
3
+ }
data/lib/hack_cards.rb CHANGED
@@ -1,17 +1,10 @@
1
1
  require "hack_cards/version"
2
2
 
3
- # This is Documentation for the file itself
4
-
5
- # This is gem level documentation
6
3
  module HackCards
7
4
 
8
- # This is class level documentation
9
5
  class Card
10
-
11
- # text, url, and image are readable and writable fields
12
6
  attr_accessor :text, :url, :image
13
7
 
14
- # this is documentation for the initialize method
15
8
  def initialize(image: "", text: "", url: "")
16
9
  @image = image if image.length > 0
17
10
  @text = text if text.length > 0
@@ -1,3 +1,3 @@
1
1
  module HackCards
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hack_cards
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - MichaelByrd
@@ -51,11 +51,15 @@ files:
51
51
  - README.md
52
52
  - Rakefile
53
53
  - hack_cards.gemspec
54
+ - lib/generators/hack_cards/USAGE
55
+ - lib/generators/hack_cards/hack_cards_generator.rb
56
+ - lib/generators/hack_cards/templates/card.html.erb
57
+ - lib/generators/hack_cards/templates/stylesheet.scss
54
58
  - lib/hack_cards.rb
55
59
  - lib/hack_cards/version.rb
56
60
  - test/hack_cards_test.rb
57
61
  - test/test_helper.rb
58
- homepage: ''
62
+ homepage: https://github.com/michaelbyrd/hack_cards
59
63
  licenses:
60
64
  - MIT
61
65
  metadata: {}
@@ -82,3 +86,4 @@ summary: A gem to help create media cards.
82
86
  test_files:
83
87
  - test/hack_cards_test.rb
84
88
  - test/test_helper.rb
89
+ has_rdoc: