welaika-suspenders 1.2.3 → 1.2.4

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: 42f77302a1ea9cda64e27012d58e35ba5465e214
4
- data.tar.gz: 78e866afa33b6b2527008fb8afe7484750844e83
3
+ metadata.gz: 6f6a633d4e3af39475d40d49df2ab7d7a5294767
4
+ data.tar.gz: 37b78ff07700a11081eb64c16cc55eb6cb0a7708
5
5
  SHA512:
6
- metadata.gz: cb98eda44027ee74f8a59fbaa4bd4f4f72de45aa5ffd6bd9e486540339438487e1393cc2b205ee430f898c764684d2a4b453cc78ce43df33f8b18554b73962e0
7
- data.tar.gz: 067b6ba53baaf918759abc41ab603ba97a5216bd6c1ac93d71182cdf3a14ffdaeef3bba10af3f46f4a919c5686752d5f525437475cfd4e0047f3555e05edc41f
6
+ metadata.gz: 2e287cfc1d571a2af8ef074442052b801d41ee3bdf9c0c6a5fe80ae0d01b09a61b963a913ba3e3660affdecbda239614eb89b769338bc755eb14e2217fadf7fb
7
+ data.tar.gz: ba538dc5a7873be227116aacc76c531bf71d782b88e4d427df18d3b5858168426c4350b54a3e097b1cbce04007c2d39ca0b04f48e91fb4d72ed4492ec2358d2b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- welaika-suspenders (1.2.3)
4
+ welaika-suspenders (1.2.4)
5
5
  bundler (>= 1.1)
6
6
  hub (~> 1.10.2)
7
7
  rails (= 3.2.12)
@@ -65,7 +65,7 @@ GEM
65
65
  i18n (>= 0.4.0)
66
66
  mime-types (~> 1.16)
67
67
  treetop (~> 1.4.8)
68
- mime-types (1.21)
68
+ mime-types (1.22)
69
69
  multi_json (1.7.2)
70
70
  polyglot (0.3.3)
71
71
  rack (1.4.5)
@@ -107,7 +107,7 @@ GEM
107
107
  rack (~> 1.0)
108
108
  tilt (~> 1.1, != 1.3.0)
109
109
  term-ansicolor (1.0.7)
110
- thor (0.18.0)
110
+ thor (0.18.1)
111
111
  tilt (1.3.6)
112
112
  treetop (1.4.12)
113
113
  polyglot
@@ -1,16 +1,18 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require File.expand_path(File.join('..', 'lib', 'suspenders', 'generators', 'app_generator'), File.dirname(__FILE__))
4
- require File.expand_path(File.join('..', 'lib', 'suspenders', 'actions'), File.dirname(__FILE__))
5
- require File.expand_path(File.join('..', 'lib', 'suspenders', 'app_builder'), File.dirname(__FILE__))
3
+ require File.expand_path(File.join('..', 'lib', 'welaika_suspenders', 'generators', 'app_generator'), File.dirname(__FILE__))
4
+ require File.expand_path(File.join('..', 'lib', 'welaika_suspenders', 'actions'), File.dirname(__FILE__))
5
+ require File.expand_path(File.join('..', 'lib', 'welaika_suspenders', 'app_builder'), File.dirname(__FILE__))
6
+ require File.expand_path(File.join('..', 'lib', 'welaika_suspenders', 'version_check'), File.dirname(__FILE__))
6
7
 
7
8
  if ['create', '--create'].include? ARGV[0]
8
9
  ARGV.shift
9
- puts "[WARNING] the suspenders create argument is deprecated. Just use `suspenders #{ARGV.join}` instead"
10
+ puts "[WARNING] the welaika-suspenders create argument is deprecated. Just use `suspenders #{ARGV.join}` instead"
10
11
  end
11
12
 
12
13
  templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__))
13
- Suspenders::AppGenerator.source_root templates_root
14
- Suspenders::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
14
+ WelaikaSuspenders::AppGenerator.source_root templates_root
15
+ WelaikaSuspenders::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
15
16
 
16
- Suspenders::AppGenerator.start
17
+ WelaikaSuspenders::VersionCheck.check_if_up_to_date!
18
+ WelaikaSuspenders::AppGenerator.start
@@ -1,4 +1,4 @@
1
- module Suspenders
1
+ module WelaikaSuspenders
2
2
  module Actions
3
3
  def concat_file(source, destination)
4
4
  contents = IO.read(find_in_source_paths(source))
@@ -1,6 +1,6 @@
1
- module Suspenders
1
+ module WelaikaSuspenders
2
2
  class AppBuilder < Rails::AppBuilder
3
- include Suspenders::Actions
3
+ include WelaikaSuspenders::Actions
4
4
 
5
5
  def readme
6
6
  template 'README.md.erb', 'README.md'
@@ -1,7 +1,7 @@
1
1
  require 'rails/generators'
2
2
  require 'rails/generators/rails/app/app_generator'
3
3
 
4
- module Suspenders
4
+ module WelaikaSuspenders
5
5
  class AppGenerator < Rails::Generators::AppGenerator
6
6
  class_option :database, :type => :string, :aliases => '-d', :default => 'postgresql',
7
7
  :desc => "Preconfigure for selected database (options: #{DATABASES.join('/')})"
@@ -187,7 +187,7 @@ module Suspenders
187
187
  protected
188
188
 
189
189
  def get_builder_class
190
- Suspenders::AppBuilder
190
+ WelaikaSuspenders::AppBuilder
191
191
  end
192
192
 
193
193
  def using_active_record?
@@ -0,0 +1,3 @@
1
+ module WelaikaSuspenders
2
+ VERSION = '1.2.4'
3
+ end
@@ -0,0 +1,27 @@
1
+ require 'open-uri'
2
+ require 'json'
3
+ require 'timeout'
4
+ require 'welaika_suspenders/version'
5
+
6
+ module WelaikaSuspenders
7
+ module VersionCheck
8
+ ENDPOINT = 'https://rubygems.org/api/v1/versions/welaika-suspenders.json'
9
+
10
+ def self.check_if_up_to_date!
11
+ data = Timeout::timeout(10) do
12
+ JSON.parse(open(ENDPOINT).read)
13
+ end
14
+ latest_version = data.first["number"]
15
+ up_to_date = Gem::Version.new(latest_version) <= Gem::Version.new(WelaikaSuspenders::VERSION)
16
+ unless up_to_date
17
+ puts "[WARNING] It looks like welaika-suspenders has been updated (v#{latest_version})! It is strongly suggested to upgrade to the latest version available with the following command:\n\ngem update welaika-suspenders\n\n"
18
+ puts "To cancel the execution of the command, press CTRL+C. To continue, just press anything.\n\n"
19
+ gets
20
+ end
21
+ rescue SocketError, Timeout::Error
22
+ puts "[WARNING] I could not check if this is the latest version available of the gem!\n"
23
+ puts "To cancel the execution of the command, press CTRL+C. To continue, just press anything.\n\n"
24
+ gets
25
+ end
26
+ end
27
+ end
@@ -1,7 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'airbrake'
4
- gem 'basic_presenter'
5
4
  gem 'bourbon'
6
5
  gem 'flutie'
7
6
  gem 'jquery-rails'
@@ -9,6 +8,7 @@ gem 'pg'
9
8
  gem 'rack-timeout'
10
9
  gem 'rails', '>= 3.2.11'
11
10
  gem 'recipient_interceptor'
11
+ gem 'showcase'
12
12
  gem 'simple_form'
13
13
  gem 'slim-rails'
14
14
  gem 'strong_parameters'
@@ -14,3 +14,9 @@ autoload_paths = ActiveSupport::Dependencies.autoload_paths
14
14
  autoload_paths.push(path) unless autoload_paths.include?(path)
15
15
  end
16
16
 
17
+ # find definitions only if factory girls has not been already required
18
+ if require 'factory_girl'
19
+ require File.join(RAILS_ROOT, "spec/support/factory_girl.rb")
20
+ FactoryGirl.find_definitions
21
+ end
22
+
@@ -1,3 +1 @@
1
- ActionController::Base.send :include, BasicPresenter::Helpers
2
- ActionController::Base.send :helper_method, :present
3
- ActionController::Base.send :helper_method, :present_collection
1
+ ActionController::Base.send :include, Showcase::Helpers
@@ -1,11 +1,11 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require 'suspenders/version'
3
+ require 'welaika_suspenders/version'
4
4
  require 'date'
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = 'welaika-suspenders'
8
- s.version = Suspenders::VERSION
8
+ s.version = WelaikaSuspenders::VERSION
9
9
  s.date = Date.today.strftime('%Y-%m-%d')
10
10
  s.authors = ['thoughtbot', 'welaika']
11
11
  s.email = 'info@welaika.com'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: welaika-suspenders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoughtbot
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-28 00:00:00.000000000 Z
12
+ date: 2013-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -110,10 +110,11 @@ files:
110
110
  - features/support/env.rb
111
111
  - features/support/fake_github.rb
112
112
  - features/support/fake_heroku.rb
113
- - lib/suspenders/actions.rb
114
- - lib/suspenders/app_builder.rb
115
- - lib/suspenders/generators/app_generator.rb
116
- - lib/suspenders/version.rb
113
+ - lib/welaika_suspenders/actions.rb
114
+ - lib/welaika_suspenders/app_builder.rb
115
+ - lib/welaika_suspenders/generators/app_generator.rb
116
+ - lib/welaika_suspenders/version.rb
117
+ - lib/welaika_suspenders/version_check.rb
117
118
  - templates/Gemfile_clean
118
119
  - templates/Procfile
119
120
  - templates/README.md.erb
@@ -1,3 +0,0 @@
1
- module Suspenders
2
- VERSION = '1.2.3'
3
- end