base_presenter 0.0.10 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,3 +2,8 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in base_presenter.gemspec
4
4
  gemspec
5
+ group :test do
6
+ gem 'rake'
7
+ gem 'coveralls', require: false
8
+ gem 'rspec'
9
+ end
File without changes
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # BasePresenter
2
- [![Gem Version](https://badge.fury.io/rb/base_presenter.png)](http://badge.fury.io/rb/base_presenter)
2
+ [![Gem Version](https://badge.fury.io/rb/base_presenter.png)](http://badge.fury.io/rb/base_presenter)
3
3
  [![Build Status](https://travis-ci.org/raglub/base_presenter.png?branch=master)](https://travis-ci.org/raglub/base_presenter)
4
4
  [![Code Climate](https://codeclimate.com/github/raglub/base_presenter.png)](https://codeclimate.com/github/raglub/base_presenter)
5
+ [![Dependency Status](https://gemnasium.com/raglub/base_presenter.png)](https://gemnasium.com/raglub/base_presenter)
6
+ [![Coverage Status](https://coveralls.io/repos/raglub/base_presenter/badge.png)](https://coveralls.io/r/raglub/base_presenter)
5
7
 
6
8
  The gem adds "Presenter" functionality into Rails application.
7
9
 
@@ -29,6 +31,16 @@ Usa a generator
29
31
 
30
32
  ## Second step
31
33
 
34
+ Add line
35
+
36
+ ```ruby
37
+ include BasePresenter::ApplicationHelper
38
+ ```
39
+
40
+ to ApplicationHelper module in Rails application.
41
+
42
+ ## Third step
43
+
32
44
  For model_name equal 'example' we should get file in director root_rails/app/presenters/example_presenter.rb which we can improve.
33
45
  For example:
34
46
 
@@ -81,3 +93,9 @@ Method returns span with 'None given' when value is blank
81
93
  ```erb
82
94
  #handle_none(value)
83
95
  ```
96
+
97
+ # License
98
+
99
+ BasePresenter uses the MIT license. Please check the [LICENSE][] file for more details.
100
+
101
+ [license]: https://github.com/raglub/base_presenter/blob/master/LICENSE
@@ -6,7 +6,8 @@ require 'base_presenter/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "base_presenter"
8
8
  spec.version = BasePresenter::VERSION
9
- spec.date = '2013-10-28'
9
+ spec.platform = Gem::Platform::RUBY
10
+ spec.date = '2013-10-31'
10
11
  spec.authors = ["Michał Szyma"]
11
12
  spec.email = ["raglub.ruby@gmail.com"]
12
13
  spec.description = %q{The gem adds "Presenter" functionality into Rails application.}
@@ -23,6 +24,5 @@ Gem::Specification.new do |spec|
23
24
  spec.add_development_dependency 'rake'
24
25
  spec.add_development_dependency 'rspec-rails'
25
26
  spec.add_development_dependency 'rails', '>= 3.0.0'
26
- spec.add_development_dependency 'simplecov'
27
27
 
28
28
  end
@@ -1,5 +1,5 @@
1
1
  require "base_presenter/version"
2
- require "application_helper"
2
+ require "base_presenter/application_helper"
3
3
 
4
4
  class BasePresenter
5
5
 
@@ -1,4 +1,4 @@
1
- module ApplicationHelper
1
+ module BasePresenter::ApplicationHelper
2
2
  def present(object_or_class, klass = nil, &block)
3
3
  presenter = nil
4
4
 
@@ -1,3 +1,3 @@
1
1
  class BasePresenter
2
- VERSION = "0.0.10"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -1,2 +1,3 @@
1
1
  module ApplicationHelper
2
+ include BasePresenter::ApplicationHelper
2
3
  end
@@ -1,7 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ApplicationHelper do
4
-
5
4
  let(:dummy_model) { DummyModel.new }
6
5
 
7
6
  describe "for DummyModel object" do
@@ -5,8 +5,8 @@ require 'rspec/rails'
5
5
  require 'base_presenter'
6
6
  require_relative 'support/dummy_model_presenter'
7
7
 
8
- require 'simplecov'
9
- SimpleCov.start
8
+ require 'coveralls'
9
+ Coveralls.wear!
10
10
 
11
11
  RSpec.configure do |config|
12
12
  config.color_enabled = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-28 00:00:00.000000000 Z
12
+ date: 2013-10-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -75,22 +75,6 @@ dependencies:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: 3.0.0
78
- - !ruby/object:Gem::Dependency
79
- name: simplecov
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
78
  description: The gem adds "Presenter" functionality into Rails application.
95
79
  email:
96
80
  - raglub.ruby@gmail.com
@@ -101,12 +85,12 @@ files:
101
85
  - .gitignore
102
86
  - .travis.yml
103
87
  - Gemfile
104
- - LICENSE.txt
88
+ - LICENSE
105
89
  - README.md
106
90
  - Rakefile
107
91
  - base_presenter.gemspec
108
- - lib/application_helper.rb
109
92
  - lib/base_presenter.rb
93
+ - lib/base_presenter/application_helper.rb
110
94
  - lib/base_presenter/version.rb
111
95
  - lib/generators/base_presenter/install/USAGE
112
96
  - lib/generators/base_presenter/install/install_generator.rb