trenni-formatters 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fd74ee1b46456caafe6ec626f29bbec1506caf5
4
- data.tar.gz: 4fe2f7fb5b96055db6006021fb373b9002645846
3
+ metadata.gz: 3010072052341464ed8f33309fd8b9b59b827c8b
4
+ data.tar.gz: 4d4e10b75652a479706624c450ef5905c67507d0
5
5
  SHA512:
6
- metadata.gz: ef17eaae51dbbc08dc2d421b0dfd442be1b911f47f16aca4f789ba6b3bda46a8e8fc04788a1f842c43ce44ac387d86be633e8bea12ff59a487ab303b1ad70d66
7
- data.tar.gz: 54a64984c6f7327a9c80da74176f7b26da23b06fd1b2f37993653f683c35b06526c20eaf14531c042e714ba21c93c07ecd64427715460b7a76d477b786d003bd
6
+ metadata.gz: dc49678aecb21aef566d29fd8c4e1a8dbb734d54160dc76b6c39ef28b1dfe581000de5723080f840374bceca8f5dfa87471e0707213004b00df038bc52e2cce1
7
+ data.tar.gz: e6a51446102c792d38f64315ffbd64bdf55ac091048fd3a2bf3a4ac3bc3438f6e4b4ffea49b18cd3c3cb34dc27425dddfa7069d816555d50ddaad99f93ea9aa6
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --color
2
+ --format documentation
3
+ --backtrace
4
+ --warnings
data/.simplecov ADDED
@@ -0,0 +1,9 @@
1
+
2
+ SimpleCov.start do
3
+ add_filter "/spec/"
4
+ end
5
+
6
+ if ENV['TRAVIS']
7
+ require 'coveralls'
8
+ Coveralls.wear!
9
+ end
data/.travis.yml CHANGED
@@ -1,5 +1,13 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  rvm:
3
- - "1.9"
4
- - "2.0"
5
- - "2.1"
4
+ - 2.0.0
5
+ - 2.1.8
6
+ - 2.2.4
7
+ - 2.3.0
8
+ - ruby-head
9
+ - rbx-2
10
+ env: COVERAGE=true
11
+ matrix:
12
+ allow_failures:
13
+ - rvm: "rbx-2"
data/Gemfile CHANGED
@@ -2,3 +2,8 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in trenni-formatters.gemspec
4
4
  gemspec
5
+
6
+ group :test do
7
+ gem 'simplecov'
8
+ gem 'coveralls', require: false
9
+ end
data/README.md CHANGED
@@ -8,6 +8,8 @@ Formatters are designed to be customised, typically per-project, for specific
8
8
  formatting needs.
9
9
 
10
10
  [![Build Status](https://travis-ci.org/ioquatix/trenni-formatters.svg?branch=master)](https://travis-ci.org/ioquatix/trenni-formatters)
11
+ [![Code Climate](https://codeclimate.com/github/ioquatix/trenni-formatters.png)](https://codeclimate.com/github/ioquatix/trenni-formatters)
12
+ [![Coverage Status](https://coveralls.io/repos/ioquatix/trenni-formatters/badge.svg)](https://coveralls.io/r/ioquatix/trenni-formatters)
11
13
 
12
14
  ## Installation
13
15
 
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
3
 
4
- RSpec::Core::RakeTask.new(:spec)
4
+ RSpec::Core::RakeTask.new(:spec) do |task|
5
+ task.rspec_opts = ["--require", "simplecov"] if ENV['COVERAGE']
6
+ end
5
7
 
6
8
  task :default => :spec
@@ -30,7 +30,7 @@ module Trenni
30
30
 
31
31
  def format(object, options = {})
32
32
  if formatter = @formatters[object.class]
33
- @formatters[object.class].call(object, options)
33
+ formatter.call(object, options)
34
34
  else
35
35
  if object
36
36
  Strings::to_html(object.to_s)
@@ -87,7 +87,9 @@ module Trenni
87
87
  def submit(options = {})
88
88
  options = @options.merge(options)
89
89
 
90
- unless title = title_for(options)
90
+ if title = title_for(options)
91
+ options[:title] = title
92
+ else
91
93
  options[:title] ||= new_record? ? 'Create' : 'Update'
92
94
  end
93
95
 
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Trenni
22
22
  module Formatters
23
- VERSION = "0.5.2"
23
+ VERSION = "0.5.3"
24
24
  end
25
25
  end
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "trenni", "~> 1.4.0"
28
28
 
29
29
  spec.add_development_dependency "bundler", "~> 1.3"
30
- spec.add_development_dependency "rspec", "~> 3.0.0.rc1"
30
+ spec.add_development_dependency "rspec", "~> 3.4.0"
31
31
  spec.add_development_dependency "rake"
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trenni-formatters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2016-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trenni
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.0.rc1
47
+ version: 3.4.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.0.0.rc1
54
+ version: 3.4.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -77,6 +77,8 @@ extensions: []
77
77
  extra_rdoc_files: []
78
78
  files:
79
79
  - ".gitignore"
80
+ - ".rspec"
81
+ - ".simplecov"
80
82
  - ".travis.yml"
81
83
  - Gemfile
82
84
  - README.md
@@ -111,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
113
  version: '0'
112
114
  requirements: []
113
115
  rubyforge_project:
114
- rubygems_version: 2.2.2
116
+ rubygems_version: 2.4.6
115
117
  signing_key:
116
118
  specification_version: 4
117
119
  summary: Formatters for Trenni, to assist with typical views and form based interfaces.