spine-extensions 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ .DS_Store
2
+ pkg/*
3
+ *.gem
4
+ *.rbc
5
+ *.swp
6
+ .bundle
7
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,51 @@
1
+ # Spine-Extensions
2
+
3
+ Provides opinionated but a handy set of extensions to the awesome [Spine](http://spinejs.com) framework.
4
+
5
+ ## What does it do?
6
+
7
+ It gives you a number of useful helpers and utilities to make you a happier programmer and save you some typing.
8
+ It is supposed to grow with time. So feel free to request what you do very often.
9
+
10
+ Currently it includes:
11
+
12
+ ### Spine.Controller and JST templating bridge
13
+
14
+ - `@view 'show'` = `JST['app/views/posts/show']`
15
+ - `@generate 'show', post` = `JST['app/views/posts/show'](post)`
16
+
17
+ ## Setup
18
+
19
+ This gem requires [spine-rails](https://github.com/maccman/spine-rails).
20
+
21
+ If you want to use it standalone, you will have to compile the files inside `app/assets/javascripts` for now.
22
+
23
+ ### Installation
24
+
25
+ In your Gemfile, add this line:
26
+
27
+ gem "spine-extensions"
28
+
29
+ Then run the following commands:
30
+
31
+ bundle install
32
+
33
+ bundle exec rails generate spine_extensions:install
34
+
35
+ If you have a non-default `application.js`, then instead of running the generator require the extensions via Sprockets:
36
+
37
+ ```coffee
38
+ # from .coffee file
39
+ #= require spine-extensions
40
+ ```
41
+ or
42
+
43
+ ```javascript
44
+ // from .js file
45
+ //= require spine-extensions
46
+ ```
47
+
48
+
49
+ ## License
50
+
51
+ MIT
@@ -0,0 +1,10 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ # require "spec/rake/spectask"
5
+ # desc "Run all examples"
6
+ # Spec::Rake::SpecTask.new(:spec) do |t|
7
+ # t.ruby_opts = ['-r test/unit']
8
+ # t.spec_opts = %w[--color]
9
+ # end
10
+ task :default => :spec
@@ -0,0 +1,12 @@
1
+ #= require spine
2
+
3
+ # Controller view rendering helpers
4
+ Spine.Controller.include
5
+ view: (name) ->
6
+ protoString = @constructor.toString().match(/^function ([^\(]+)/)[1] # Blogs
7
+ areaName = protoString.toLowerCase() # blogs
8
+ JST["app/views/#{areaName}/#{name}"]
9
+
10
+ generate: (name, data) -> @view(name)(data)
11
+
12
+
@@ -0,0 +1,15 @@
1
+ module SpineExtensions
2
+ module Generators
3
+
4
+ class InstallGenerator < ::Rails::Generators::Base
5
+ desc "This generator installs Spine Extensions into application.js manigest"
6
+
7
+ def inject_require_into_manifest
8
+ inject_into_file "app/assets/javascripts/application.js", :before => "//= require_tree" do
9
+ "//= require spine-extensions\n"
10
+ end
11
+ end
12
+ end
13
+
14
+ end
15
+ end
@@ -0,0 +1,2 @@
1
+ require 'spine_extensions/version'
2
+ require 'spine_extensions/engine'
@@ -0,0 +1,6 @@
1
+ module SpineExtensions
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module SpineExtensions
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/spine_extensions/version', __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "spine-extensions"
6
+ s.version = SpineExtensions::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ["Dmytrii Nagirniak"]
9
+ s.email = ["dnagir@gmail.com"]
10
+ s.homepage = "http://github.com/dnagir/spine-extensions"
11
+ s.summary = "Bridge the gap between Spine.js and Rails and make it easier to use it"
12
+ s.description = "This gem provides a set of handy extensions to Spine and Rails to make you a happier programmer"
13
+
14
+ s.required_rubygems_version = ">= 1.3.6"
15
+ s.rubyforge_project = "spine-extensions"
16
+
17
+ s.add_dependency 'rails', '>= 3.1.0'
18
+ s.add_dependency 'spine-rails'
19
+ s.add_development_dependency "bundler"
20
+
21
+ s.files = `git ls-files`.split("\n")
22
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
24
+ s.require_paths = ["lib"]
25
+ end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spine-extensions
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Dmytrii Nagirniak
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-10-21 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &70245423935140 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 3.1.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70245423935140
25
+ - !ruby/object:Gem::Dependency
26
+ name: spine-rails
27
+ requirement: &70245423934320 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70245423934320
36
+ - !ruby/object:Gem::Dependency
37
+ name: bundler
38
+ requirement: &70245423931500 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70245423931500
47
+ description: This gem provides a set of handy extensions to Spine and Rails to make
48
+ you a happier programmer
49
+ email:
50
+ - dnagir@gmail.com
51
+ executables: []
52
+ extensions: []
53
+ extra_rdoc_files: []
54
+ files:
55
+ - .gitignore
56
+ - Gemfile
57
+ - README.md
58
+ - Rakefile
59
+ - app/assets/javascripts/spine-extensions.coffee
60
+ - lib/generators/spine_extensions/install/install_generator.rb
61
+ - lib/spine-extensions.rb
62
+ - lib/spine_extensions/engine.rb
63
+ - lib/spine_extensions/version.rb
64
+ - spine-extensions.gemspec
65
+ homepage: http://github.com/dnagir/spine-extensions
66
+ licenses: []
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.3.6
83
+ requirements: []
84
+ rubyforge_project: spine-extensions
85
+ rubygems_version: 1.8.10
86
+ signing_key:
87
+ specification_version: 3
88
+ summary: Bridge the gap between Spine.js and Rails and make it easier to use it
89
+ test_files: []