frontend-helpers 0.0.1.beta.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +67 -4
  2. data/Rakefile +1 -1
  3. data/frontend-helpers.gemspec +3 -3
  4. metadata +16 -16
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Frontend Helpers #
2
2
 
3
- This is a collection of Rails 3.1 Helpers that I have compiled together into one nice neat special little gem... it'll handle doing things such as Meta tag creation, Facebook Open Graph Tag Creation, javascript integration for, Google Analytics, Chartbeat, Inspectlet, Mixpanel, Woopra, Kissmetrics, Quantcast, and Olark, as well I've packaged in a few of my favorite/most used javascript libraries for building amazing web apps, and last but not least, added a great `reset.css.sass` file that goes really nicely with my `variables.css.sass` file, for a basic clean view.
3
+ HARD DEPENDENCY: HAML & SASS
4
+ I do plan on making it work for both ERB & HAML but currently all my projects use both, so I haven't found the time to add this option.
5
+
6
+ This is a collection of Rails 3.1 Helpers that I have compiled together into one nice neat special little gem... it'll handle doing things such as a few HTML5 helpers, Meta tag creation, Facebook Open Graph Tag Creation, javascript integration for, Google Analytics, Chartbeat, Inspectlet, Mixpanel, Woopra, Kissmetrics, Quantcast, and Olark, as well I've packaged in a few of my favorite/most used javascript libraries for building amazing web apps, and last but not least, added a great `reset.css.sass` file that goes really nicely with my `variables.css.sass` file, for a basic clean view.
4
7
 
5
8
  Try it on your next project, I'm sure you'll like it.
6
9
 
@@ -24,6 +27,18 @@ This should come up and tell you that it's copying `config/settings.yml`, `confi
24
27
 
25
28
  Then you can start editing them:
26
29
 
30
+
31
+ ### HTML5 ###
32
+
33
+ before you use the HTML5 HTML tag as Paul Irish wrote for the HTML5 Boilerplate `application_controller.rb` add:
34
+
35
+ include FrontendHelpers::Html5Helper
36
+
37
+ Then in your application.html.haml instead of using `%html` use
38
+
39
+ - html_tag class: 'no-js' do
40
+
41
+
27
42
  ### Settings.yml ###
28
43
 
29
44
  Before you start adding your content to the `settings.yml` you should probably start by including the helper in your `application_controller.rb` add:
@@ -42,7 +57,7 @@ Say for instance you set the key `title`
42
57
 
43
58
  :title: "Chris Hein's Site"
44
59
 
45
- And on the homepage you liked that, but maybe on the about page you would like it to say `About Chris Hein` with this plugin that's really simple, in your action for your about page simple add:
60
+ And on the homepage you liked that, but maybe on the about page you would like it to say `About Chris Hein` with this plugin that's really simple, in your action for your about page simple add an instance variable as so:
46
61
 
47
62
  @meta_title = "About Chris Hein"
48
63
 
@@ -71,14 +86,60 @@ This will overwrite the current title with whatever you'd like. This is the list
71
86
  :"og:country_name" => @meta_og_country_name,
72
87
  :"og:phone_number" => @meta_og_phone_number
73
88
 
89
+
74
90
  ### Services.yml ###
75
91
 
76
- TODO: Write how to use this
92
+ Before you start adding your content to the `services.yml` you should probably start by including the helper in your `application_controller.rb` add:
93
+
94
+ include FrontendHelpers::ServicesHelper
95
+
96
+ Next where ever you want the services javascript to appear (I'd recommend using it at the end of the body) use:
97
+
98
+ - webservice [:google, :olark, :chartbeat, :inspectlet, :mixpanel, :woopra, :kissmetrics, :quantcast]
99
+
100
+ This example shows all of the services that can be included although you will not see any of them unless you have added the necessary information in the `services.yml` you can remove any of them from the array if need be.
101
+
102
+ Inside the `services.yml` you will find all of variables that should be set to use each one of the services. All of them are pretty self explanatory and the keys can be gotten from each service.
77
103
 
78
104
 
79
105
  ### Assets ###
80
106
 
81
- TODO: Write how to use this
107
+ As far as the assets I've added a few of my favorite and most used javascript libraries, those are:
108
+
109
+ [Backbone](http://documentcloud.github.com/backbone/)
110
+ [Underscore](http://documentcloud.github.com/underscore/)
111
+ [DD Belated PNG](http://www.dillerdesign.com/experiment/DD_belatedPNG/)
112
+ [jQuery Asynchronous Plugin](http://mess.genezys.net/jquery/jquery.async.php)
113
+ [jQuery Cookie plugin](https://github.com/carhartl/jquery-cookie)
114
+ [jQuery Lifestream](https://github.com/christianv/jquery-lifestream)
115
+ [jQuery Validation](http://bassistance.de/jquery-plugins/jquery-plugin-validation/)
116
+ [Log Helper](http://html5boilerplate.com)
117
+ [Modernizr](http://www.modernizr.com/)
118
+ [Shortcut JS](http://www.openjs.com/scripts/events/keyboard_shortcuts/)
119
+ [SWF Object](http://code.google.com/p/swfobject/)
120
+
121
+ All of these can be added to your manifest file for Sprockets like this
122
+
123
+ //= require backbone
124
+ //= require ie
125
+ //= require jquery.async
126
+ //= require jquery.cookie
127
+ //= require jquery.lifestream
128
+ //= require jquery.vaidate
129
+ //= require log
130
+ //= require modernizr
131
+ //= require shortcut
132
+ //= require swfobject
133
+
134
+ Not only did I add a bunch of wonderfully awesome javascript libs I also added a css reset that can be used, as well as a base variables... Although with sprockets currently you cannot include files with persistent variables, so I would highly recommend using SASS's built in `@import` to include files to do so include both files like so rename `application.css` to `application.css.sass` then add:
135
+
136
+ @import "variables.css.sass"
137
+ @import "reset.css.sass"
138
+
139
+
140
+ ## Thanks ##
141
+
142
+ I hope you enjoy using this Rubygem, if you have any questions, issues, or feature requests please make them in the issues section, I'll be continually adding to this so please keep checking in on the progress.
82
143
 
83
144
 
84
145
  ## Contributing to Frontend Helpers ##
@@ -95,3 +156,5 @@ TODO: Write how to use this
95
156
 
96
157
  Copyright (c) 2011 Christopher Hein. See LICENSE.txt for
97
158
  further details.
159
+
160
+ All javascript libraries are still copyrighted to their respective owners, this is just a way to easy add them to any project without having to deal with the files themselves.
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ Jeweler::Tasks.new do |gem|
19
19
  gem.description = %Q{Large collection of useful Rails 3.1 helpers for SEO, Metatags, Facebook OG tags, integration for analytics services like google, woopra, olark, mixpanel and much much more...}
20
20
  gem.email = "me@christopherhein.com"
21
21
  gem.authors = ["Christopher Hein"]
22
- gem.version = "0.0.1.beta.1"
22
+ gem.version = "0.0.2"
23
23
  # dependencies defined in Gemfile
24
24
  end
25
25
  Jeweler::RubygemsDotOrgTasks.new
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{frontend-helpers}
8
- s.version = "0.0.1.beta.1"
8
+ s.version = "0.0.2"
9
9
 
10
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christopher Hein"]
12
- s.date = %q{2011-07-10}
12
+ s.date = %q{2011-07-11}
13
13
  s.description = %q{Large collection of useful Rails 3.1 helpers for SEO, Metatags, Facebook OG tags, integration for analytics services like google, woopra, olark, mixpanel and much much more...}
14
14
  s.email = %q{me@christopherhein.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,20 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frontend-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta.1
5
- prerelease: 6
4
+ version: 0.0.2
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Christopher Hein
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-10 00:00:00.000000000 -07:00
12
+ date: 2011-07-11 00:00:00.000000000 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &2160497800 !ruby/object:Gem::Requirement
17
+ requirement: &2170509820 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.1.0.rc4
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2160497800
25
+ version_requirements: *2170509820
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: haml-rails
28
- requirement: &2160496080 !ruby/object:Gem::Requirement
28
+ requirement: &2170690020 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 0.3.4
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2160496080
36
+ version_requirements: *2170690020
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: sass-rails
39
- requirement: &2160495040 !ruby/object:Gem::Requirement
39
+ requirement: &2170726200 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 3.1.0.rc
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2160495040
47
+ version_requirements: *2170726200
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: sprockets
50
- requirement: &2160494400 !ruby/object:Gem::Requirement
50
+ requirement: &2170728960 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 2.0.0.beta.10
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *2160494400
58
+ version_requirements: *2170728960
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: jeweler
61
- requirement: &2160493260 !ruby/object:Gem::Requirement
61
+ requirement: &2170737720 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: 1.6.4
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2160493260
69
+ version_requirements: *2170737720
70
70
  description: Large collection of useful Rails 3.1 helpers for SEO, Metatags, Facebook
71
71
  OG tags, integration for analytics services like google, woopra, olark, mixpanel
72
72
  and much much more...
@@ -159,13 +159,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
159
  version: '0'
160
160
  segments:
161
161
  - 0
162
- hash: 3543253954648120841
162
+ hash: 1927932755556081879
163
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  none: false
165
165
  requirements:
166
- - - ! '>'
166
+ - - ! '>='
167
167
  - !ruby/object:Gem::Version
168
- version: 1.3.1
168
+ version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
171
  rubygems_version: 1.6.2