wired 0.2.0 → 0.3.0

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
- !binary "U0hBMQ==":
3
- metadata.gz: 03d889e4572b34da064a5cee14db568b83772ae3
4
- data.tar.gz: 7eb03fa3dad7a831f32f0a38629717bf98ba2155
5
- !binary "U0hBNTEy":
6
- metadata.gz: 48e8e754cbc8d9e196ad633fbd6ca70f0242afd06b2bdf2af01c15439e2669343d6de5a9258462682aaa91b07d576999f3ffaf2752cbcf7a65532bb2e45f49f8
7
- data.tar.gz: 29d62ce0b4e61535b6ddfc93fb8c018c68b7b02f219f112d74a86c44ffba6dd9d36b3061cc16a932ab5c2f92490f2f9a16e073cc745c4c1851617edd95a573f9
2
+ SHA1:
3
+ metadata.gz: 7b63426a2f65525b8215ae5c03c2d4928fc2f38b
4
+ data.tar.gz: ef58084b0af622f264f19c48ebd20e1da7c7764d
5
+ SHA512:
6
+ metadata.gz: 4183ddd92a1c12f7c318e25a55b63184ab0f04e15d1b9c9c8bb9431f01ab7c383044d458b1689a35e06b892c7237862681f4c239515510bf7454f938d3084916
7
+ data.tar.gz: 9d4069d58ea9663d71e855df6b6a58c02924196406123585b3b44e46c8ab6e75552224c48449beafe90b1ea5b14cc2e3e338cdce1dae07fb6afe315e8338d231
@@ -64,6 +64,24 @@ module Wired
64
64
  :force => true
65
65
  end
66
66
 
67
+ def remove_public_robots
68
+ remove_file 'public/robots.txt'
69
+ end
70
+
71
+ def create_robots_txt
72
+ say 'Copying robots.txt'
73
+ copy_file 'robots/allow.txt.erb', 'app/views/robots/allow.txt.erb'
74
+ copy_file 'robots/disallow.txt.erb', 'app/views/robots/disallow.txt.erb'
75
+ copy_file 'robots/robots_controller.rb', 'app/controllers/robots_controller.rb'
76
+ end
77
+
78
+ def add_robots_routes
79
+ robots_routes =<<-ROUTES
80
+ get 'robots.txt' => 'robots#index'
81
+ ROUTES
82
+ inject_into_file "config/routes.rb", robots_routes, :before => "end"
83
+ end
84
+
67
85
  def configure_time_zone
68
86
  config = <<-RUBY
69
87
  config.time_zone = 'Amsterdam'
@@ -181,6 +199,9 @@ module Wired
181
199
  %w(papertrail pgbackups newrelic memcachier).each do |addon|
182
200
  run "heroku addons:add #{addon} --remote=#{env}"
183
201
  end
202
+ run "heroku config:add DISALLOW_SEARCH=false --remote=#{env}"
203
+ else
204
+ run "heroku config:add DISALLOW_SEARCH=true --remote=#{env}"
184
205
  end
185
206
  end
186
207
  end
@@ -21,7 +21,7 @@ module Wired
21
21
  post '/' => 'facebook#tab'
22
22
 
23
23
  get 'cookie' => 'sessions#cookie', as: 'cookie'
24
- post 'user' => 'users#create', as: 'user'
24
+ resources :users, only: [:create]
25
25
  ROUTES
26
26
  inject_into_file "config/routes.rb", facebook_routes, :before => "end"
27
27
  end
@@ -139,7 +139,8 @@ Home pagina, show fangate: <%= @show_fangate %>, <a href="javascript: " data-fb-
139
139
 
140
140
  def add_gems
141
141
  gems =<<-GEMS
142
- gem 'facebook-signed-request'
142
+ gem 'facebook-signed-request'
143
+ gem 'koala'
143
144
  GEMS
144
145
  inject_into_file "Gemfile", gems, :before => "group :development, :test do"
145
146
 
@@ -47,6 +47,7 @@ module Wired
47
47
 
48
48
  def application_setup
49
49
  build :powder_setup
50
+ build :setup_robots_txt
50
51
  end
51
52
 
52
53
  def remove_files_we_dont_need
@@ -92,6 +93,12 @@ module Wired
92
93
  build :copy_miscellaneous_files
93
94
  end
94
95
 
96
+ def setup_robots_txt
97
+ build :create_robots_txt
98
+ build :remove_public_robots
99
+ build :add_robots_routes
100
+ end
101
+
95
102
  def customize_error_pages
96
103
  say 'Customizing the 500/404/422 pages'
97
104
  build :customize_error_pages
@@ -1,3 +1,3 @@
1
1
  module Wired
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
@@ -16,3 +16,4 @@
16
16
  * FOG_DIRECTORY
17
17
  * FOG_PROVIDER
18
18
  * GA_CODE (google analytics UA)
19
+ * DISALLOW_SEARCH
@@ -1,6 +1,6 @@
1
1
  <script type="text/javascript">
2
2
  var _gaq = _gaq || [];
3
- _gaq.push(['_setAccount', '<%%= ENV["GA_CODE"] %>']);
3
+ _gaq.push(['_setAccount', '<%= ENV["GA_CODE"] %>']);
4
4
  _gaq.push(['_addIgnoredRef', 'static.ak.facebook.com']);
5
5
  _gaq.push(['_addIgnoredRef', 's-static.ak.facebook.com']);
6
6
  _gaq.push(['_trackPageview']);
@@ -0,0 +1,2 @@
1
+ User-agent: *
2
+ Disallow:
@@ -0,0 +1,2 @@
1
+ User-agent: *
2
+ Disallow: /
@@ -0,0 +1,12 @@
1
+ class RobotsController < ActionController::Base
2
+ layout false
3
+ def index
4
+ if ENV['DISALLOW_SEARCH'].present? && ENV['DISALLOW_SEARCH'].downcase == 'true'
5
+ #test server
6
+ render 'disallow.txt', content_type: "text/plain"
7
+ else
8
+ #live server
9
+ render 'allow.txt', content_type: "text/plain"
10
+ end
11
+ end
12
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wired
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wirelab Creative
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-03 00:00:00.000000000 Z
11
+ date: 2014-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -28,42 +28,42 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: httparty
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.11.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.11.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: highline
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.6.19
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.6.19
69
69
  description: The Wirelab application generator
@@ -104,6 +104,9 @@ files:
104
104
  - templates/facebook/sessions_controller.rb
105
105
  - templates/facebook/users_controller.rb
106
106
  - templates/layout.html.erb.erb
107
+ - templates/robots/allow.txt.erb
108
+ - templates/robots/disallow.txt.erb
109
+ - templates/robots/robots_controller.rb
107
110
  - templates/spec/rspec
108
111
  - templates/spec/simplecov
109
112
  - templates/spec/spec_helper.rb
@@ -116,23 +119,24 @@ licenses:
116
119
  metadata: {}
117
120
  post_install_message:
118
121
  rdoc_options:
119
- - --charset=UTF-8
122
+ - "--charset=UTF-8"
120
123
  require_paths:
121
124
  - lib
122
125
  required_ruby_version: !ruby/object:Gem::Requirement
123
126
  requirements:
124
- - - ! '>='
127
+ - - ">="
125
128
  - !ruby/object:Gem::Version
126
129
  version: '0'
127
130
  required_rubygems_version: !ruby/object:Gem::Requirement
128
131
  requirements:
129
- - - ! '>='
132
+ - - ">="
130
133
  - !ruby/object:Gem::Version
131
134
  version: '0'
132
135
  requirements: []
133
136
  rubyforge_project:
134
- rubygems_version: 2.0.3
137
+ rubygems_version: 2.2.0
135
138
  signing_key:
136
139
  specification_version: 4
137
140
  summary: Wirelab Generator
138
141
  test_files: []
142
+ has_rdoc: