underscore_extensions 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ before_script:
6
+ - "export DISPLAY=:99.0"
7
+ - "sh -e /etc/init.d/xvfb start"
data/README.markdown CHANGED
@@ -1,6 +1,8 @@
1
1
  Underscore Extensions
2
2
  =====================
3
3
 
4
+ [![Build Status](https://secure.travis-ci.org/rdy/underscore_extensions.png)](http://travis-ci.org/rdy/underscore_extensions)
5
+
4
6
  Adds extensions to the underscore javascript library. It adds the javascript as a rails engine to be included in to a Rails 3+ project. To use it make sure require underscore, underscore.string and underscore.extensions.
5
7
 
6
8
  Installing
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  ENV['JASMINE_SPEC_FORMAT'] = 'Fuubar'
2
- ENV['JASMINE_BROWSER'] = 'chrome'
2
+ # Disable chrome for travis ci
3
+ # ENV['JASMINE_BROWSER'] = 'chrome'
3
4
 
4
5
  require 'bundler/gem_tasks'
5
6
  require 'jshint/tasks'
data/config/jshint.yml CHANGED
@@ -7,10 +7,10 @@
7
7
  # rake jshint paths=path1,path2,... exclude_paths=library1,library2,...
8
8
 
9
9
  paths:
10
- - assets/javascripts/**/*.js
10
+ - lib/assets/javascripts/**/*.js
11
11
 
12
12
  exclude_paths:
13
- - vendor/assets/**/*.js
13
+ - vendor/assets/javascripts/**/*.js
14
14
 
15
15
 
16
16
  # ------------ jshint options ------------
@@ -52,7 +52,8 @@ indent: 2 # Number of spaces that should be used for indentation - use
52
52
  maxerr: 50 # The maximum number of warnings reported (per file)
53
53
  passfail: false # true if the scan should stop on first error (per file)
54
54
  # following are relevant only if undef = true
55
- predef: '' # Names of predefined global variables - comma-separated string or a YAML array
55
+ predef:
56
+ - _
56
57
  browser: true # true if the standard browser globals should be predefined
57
58
  rhino: false # true if the Rhino environment globals should be predefined
58
59
  windows: false # true if Windows-specific globals should be predefined
@@ -11,7 +11,7 @@
11
11
  return s.charAt(0).toUpperCase() + s.substring(1);
12
12
  },
13
13
  except: function(obj) {
14
- if (obj === null) { return results; }
14
+ if (obj === null) { return obj; }
15
15
  var args;
16
16
  if (arguments.length === 2 && _(arguments[1]).isArray()) {
17
17
  args = arguments[1];
@@ -25,15 +25,12 @@
25
25
  return result;
26
26
  },
27
27
  namespace: function(obj, ns) {
28
- var base = obj;
29
- var splitNamespaces = ns.split('.');
30
- _(splitNamespaces).each(function(n) {
28
+ return _(ns.split('.')).inject(function(base, n) {
31
29
  if (typeof(base[n]) === 'undefined') {
32
30
  base[n] = {};
33
31
  }
34
- base = base[n];
35
- });
36
- return base;
32
+ return base[n];
33
+ }, obj);
37
34
  },
38
35
  only: function(obj) {
39
36
  function only() {
@@ -1,5 +1,5 @@
1
1
  module UnderscoreExtensions
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  UNDERSCORE_VERSION = '1.3.1'
4
4
  UNDERSCORE_STRING_VERSION = '2.0.0'
5
5
  end
@@ -1,7 +1,7 @@
1
1
  src_files:
2
2
  - vendor/assets/javascripts/underscore.js
3
3
  - vendor/assets/javascripts/underscore.string.js
4
- - vendor/assets/javascripts/underscore.extensions.js
4
+ - lib/assets/javascripts/underscore.extensions.js
5
5
  stylesheets:
6
6
  helpers:
7
7
  - support/**/*.js
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.add_development_dependency 'fuubar'
22
22
  s.add_development_dependency 'jasmine'
23
- s.add_development_dependency 'jshint'
23
+ s.add_development_dependency 'jshint_on_rails'
24
24
  s.add_development_dependency 'thin'
25
25
  s.add_runtime_dependency 'rails', '>= 3.1'
26
26
  s.add_runtime_dependency 'rails', '>= 3.1'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: underscore_extensions
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Dy
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-26 00:00:00 -08:00
18
+ date: 2012-02-29 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -47,7 +47,7 @@ dependencies:
47
47
  type: :development
48
48
  version_requirements: *id002
49
49
  - !ruby/object:Gem::Dependency
50
- name: jshint
50
+ name: jshint_on_rails
51
51
  prerelease: false
52
52
  requirement: &id003 !ruby/object:Gem::Requirement
53
53
  none: false
@@ -116,17 +116,18 @@ extra_rdoc_files: []
116
116
  files:
117
117
  - .gitignore
118
118
  - .rvmrc
119
+ - .travis.yml
119
120
  - Gemfile
120
121
  - README.markdown
121
122
  - Rakefile
122
123
  - config/jshint.yml
124
+ - lib/assets/javascripts/underscore.extensions.js
123
125
  - lib/underscore_extensions.rb
124
126
  - lib/underscore_extensions/version.rb
125
127
  - spec/javascripts/support/jasmine.yml
126
128
  - spec/javascripts/support/spec_helper.js
127
129
  - spec/javascripts/underscore.extensions_spec.js
128
130
  - underscore_extensions.gemspec
129
- - vendor/assets/javascripts/underscore.extensions.js
130
131
  - vendor/assets/javascripts/underscore.js
131
132
  - vendor/assets/javascripts/underscore.string.js
132
133
  has_rdoc: true