nutrition_label_plugin 0.0.2.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,3 +1,56 @@
1
1
  = NutritionLabelPlugin
2
2
 
3
- This project rocks and uses MIT-LICENSE.
3
+ Nutrition label generation for Rails 3.1 using the asset pipeline.
4
+
5
+ ----
6
+
7
+ == Installation
8
+
9
+ 1. If using bundler, add to your Gemfile and run bundle install:
10
+ gem nutrition_label_plugin
11
+ 2. Otherwise run gem install nutrition_label_plugin
12
+ 3. To add the CSS file to your load path, add to your app's application.css file:
13
+ *= require nutrition_label_plugin
14
+
15
+ ----
16
+
17
+ == Feature list
18
+
19
+ Currently, there is a single method available that accepts a hash of all optional
20
+ parameters.
21
+ create_base_label(args)
22
+
23
+ The method returns html output, which you can use in your views to show these
24
+ awesome nutrition fact labels.
25
+
26
+ ---
27
+ === create_base_label arguments
28
+
29
+ create_base_label takes a number of optional arguments in the form of a hash:
30
+ * :name => "string"
31
+ :yield => float, in grams
32
+ :servings => float, # of servings
33
+ :calories => float, # of calories
34
+ :fat => float, in grams
35
+ :saturated_fat => float, in grams
36
+ :trans_fat => float, in grams
37
+ :cholesterol => float, in milligrams
38
+ :sodium => float, in milligrams
39
+ :carbohydrate => float, in grams
40
+ :fiber => float, in grams
41
+ :sugar => float, in grams
42
+ :vitamin_C => float, in milligrams
43
+ :vitamin_A => float, in IU (international units)
44
+ :Iron => float, in milligrams
45
+ :calcium => float, in milligrams
46
+
47
+ ----
48
+
49
+ == Contributing
50
+
51
+ If you have any feedback or want to add methods other than the basic nutrition label,
52
+ feel free to fork and send a pull request.
53
+
54
+ ----
55
+
56
+ This project rocks and uses MIT-LICENSE.
@@ -1,3 +1,3 @@
1
1
  module NutritionLabelPlugin
2
- VERSION = "0.0.2.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nutrition_label_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-14 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &85359990 !ruby/object:Gem::Requirement
16
+ requirement: &76886890 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *85359990
24
+ version_requirements: *76886890
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &85359590 !ruby/object:Gem::Requirement
27
+ requirement: &76886460 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *85359590
35
+ version_requirements: *76886460
36
36
  description: Gem includes CSS and template for basic nutrition fact label, as well
37
37
  as a method that takes in a hash of optional macronutrients
38
38
  email: lev.berlin@gmail.com
@@ -94,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  segments:
96
96
  - 0
97
- hash: 675080689
97
+ hash: 124483535
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  none: false
100
100
  requirements:
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  segments:
105
105
  - 0
106
- hash: 675080689
106
+ hash: 124483535
107
107
  requirements: []
108
108
  rubyforge_project:
109
109
  rubygems_version: 1.8.10