nimbu 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/nimbu.rb +1 -0
- data/lib/nimbu/auth.rb +2 -1
- data/lib/nimbu/cli.rb +1 -0
- data/lib/nimbu/command.rb +2 -1
- data/lib/nimbu/command/auth.rb +1 -0
- data/lib/nimbu/command/base.rb +1 -0
- data/lib/nimbu/command/browse.rb +1 -0
- data/lib/nimbu/command/help.rb +1 -0
- data/lib/nimbu/command/helpers.rb +1 -0
- data/lib/nimbu/command/init.rb +1 -0
- data/lib/nimbu/command/server.rb +2 -1
- data/lib/nimbu/command/sites.rb +1 -0
- data/lib/nimbu/command/themes.rb +5 -4
- data/lib/nimbu/helpers.rb +2 -1
- data/lib/nimbu/server/base.rb +8 -7
- data/lib/nimbu/ssh.rb +2 -1
- data/lib/nimbu/version.rb +2 -1
- data/lib/vendor/nimbu/okjson.rb +1 -0
- metadata +19 -3
data/lib/nimbu.rb
CHANGED
data/lib/nimbu/auth.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
require "yaml"
|
2
3
|
require "nimbu"
|
3
4
|
require "nimbu/helpers"
|
@@ -180,7 +181,7 @@ class Nimbu::Auth
|
|
180
181
|
end
|
181
182
|
|
182
183
|
def read_credentials
|
183
|
-
credentials = File.read(credentials_file) if File.exists?(credentials_file)
|
184
|
+
credentials = File.read(credentials_file).force_encoding('UTF-8') if File.exists?(credentials_file)
|
184
185
|
if credentials && credentials =~ /^(bearer|oauth2|token) ([\w]+)$/i
|
185
186
|
$2
|
186
187
|
else
|
data/lib/nimbu/cli.rb
CHANGED
data/lib/nimbu/command.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
require 'nimbu/helpers'
|
2
3
|
require 'nimbu/version'
|
3
4
|
require 'term/ansicolor'
|
@@ -144,7 +145,7 @@ module Nimbu
|
|
144
145
|
FileUtils.mkdir_p(usage_directory)
|
145
146
|
usage_file = usage_directory << "/#{Nimbu::VERSION}"
|
146
147
|
usage = if File.exists?(usage_file)
|
147
|
-
json_decode(File.read(usage_file))
|
148
|
+
json_decode(File.read(usage_file).force_encoding('UTF-8'))
|
148
149
|
else
|
149
150
|
{}
|
150
151
|
end
|
data/lib/nimbu/command/auth.rb
CHANGED
data/lib/nimbu/command/base.rb
CHANGED
data/lib/nimbu/command/browse.rb
CHANGED
data/lib/nimbu/command/help.rb
CHANGED
data/lib/nimbu/command/init.rb
CHANGED
data/lib/nimbu/command/server.rb
CHANGED
data/lib/nimbu/command/sites.rb
CHANGED
data/lib/nimbu/command/themes.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
require "nimbu/command/base"
|
2
3
|
|
3
4
|
# working with themes (upload / download)
|
@@ -101,7 +102,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
101
102
|
file = "#{Dir.pwd}/layouts/#{layout}"
|
102
103
|
next if File.directory?(file)
|
103
104
|
print " - layouts/#{layout}"
|
104
|
-
nimbu.themes(:subdomain => Nimbu::Auth.site).layouts(:theme_id => theme).create({:name => layout, :content => IO.read(file)})
|
105
|
+
nimbu.themes(:subdomain => Nimbu::Auth.site).layouts(:theme_id => theme).create({:name => layout, :content => IO.read(file).force_encoding('UTF-8')})
|
105
106
|
print " (ok)\n"
|
106
107
|
end
|
107
108
|
|
@@ -110,7 +111,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
110
111
|
file = "#{Dir.pwd}/templates/#{template}"
|
111
112
|
next if File.directory?(file)
|
112
113
|
print " - templates/#{template}"
|
113
|
-
nimbu.themes(:subdomain => Nimbu::Auth.site).templates(:theme_id => theme).create({:name => template, :content => IO.read(file)})
|
114
|
+
nimbu.themes(:subdomain => Nimbu::Auth.site).templates(:theme_id => theme).create({:name => template, :content => IO.read(file).force_encoding('UTF-8')})
|
114
115
|
print " (ok)\n"
|
115
116
|
end
|
116
117
|
|
@@ -119,7 +120,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
119
120
|
file = "#{Dir.pwd}/snippets/#{snippet}"
|
120
121
|
next if File.directory?(file)
|
121
122
|
print " - snippets/#{snippet}"
|
122
|
-
nimbu.themes(:subdomain => Nimbu::Auth.site).snippets(:theme_id => theme).create({:name => snippet, :content => IO.read(file)})
|
123
|
+
nimbu.themes(:subdomain => Nimbu::Auth.site).snippets(:theme_id => theme).create({:name => snippet, :content => IO.read(file).force_encoding('UTF-8')})
|
123
124
|
print " (ok)\n"
|
124
125
|
end
|
125
126
|
end
|
@@ -185,4 +186,4 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
185
186
|
end
|
186
187
|
end
|
187
188
|
end
|
188
|
-
end
|
189
|
+
end
|
data/lib/nimbu/helpers.rb
CHANGED
data/lib/nimbu/server/base.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
require 'sinatra'
|
2
3
|
require "sinatra/reloader"
|
3
4
|
require "sinatra/multi_route"
|
@@ -137,9 +138,9 @@ module Nimbu
|
|
137
138
|
template_file_haml = File.join(Dir.pwd,'templates',"#{template}.haml")
|
138
139
|
|
139
140
|
if File.exists?(template_file)
|
140
|
-
template_code = IO.read(template_file)
|
141
|
+
template_code = IO.read(template_file).force_encoding('UTF-8')
|
141
142
|
elsif File.exists?(template_file_haml)
|
142
|
-
template_code = IO.read(template_file_haml)
|
143
|
+
template_code = IO.read(template_file_haml).force_encoding('UTF-8')
|
143
144
|
template = "#{template}.haml"
|
144
145
|
else
|
145
146
|
puts red("Layout file '#{template_file}' is missing...")
|
@@ -164,10 +165,10 @@ module Nimbu
|
|
164
165
|
layout_file_haml = File.join(Dir.pwd,'layouts',"#{layout}.haml")
|
165
166
|
|
166
167
|
if File.exists?(layout_file)
|
167
|
-
layout_code = IO.read(layout_file)
|
168
|
+
layout_code = IO.read(layout_file).force_encoding('UTF-8')
|
168
169
|
elsif File.exists?(layout_file_haml)
|
169
170
|
layout = "#{layout}.haml"
|
170
|
-
layout_code = IO.read(layout_file_haml)
|
171
|
+
layout_code = IO.read(layout_file_haml).force_encoding('UTF-8')
|
171
172
|
else
|
172
173
|
puts red("Layout file '#{layout_file}' is missing...")
|
173
174
|
return render_missing(File.join('layouts',layout),'layout')
|
@@ -300,11 +301,11 @@ module Nimbu
|
|
300
301
|
snippet_file_haml = File.join(Dir.pwd,'snippets',"#{snippet_name}.haml")
|
301
302
|
|
302
303
|
if File.exists?(snippet_file)
|
303
|
-
snippet_code = IO.read(snippet_file)
|
304
|
+
snippet_code = IO.read(snippet_file).force_encoding('UTF-8')
|
304
305
|
snippets[snippet_name.to_sym] = snippet_code
|
305
306
|
self.parse_snippets(snippet_code, snippets)
|
306
307
|
elsif File.exists?(snippet_file_haml)
|
307
|
-
snippet_code = IO.read(snippet_file_haml)
|
308
|
+
snippet_code = IO.read(snippet_file_haml).force_encoding('UTF-8')
|
308
309
|
snippets["#{snippet_name}.haml".to_sym] = snippet_code
|
309
310
|
self.parse_snippets(snippet_code, snippets)
|
310
311
|
else
|
@@ -317,4 +318,4 @@ module Nimbu
|
|
317
318
|
|
318
319
|
end
|
319
320
|
end
|
320
|
-
end
|
321
|
+
end
|
data/lib/nimbu/ssh.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
require "yaml"
|
2
3
|
require "nimbu"
|
3
4
|
require "nimbu/helpers"
|
@@ -48,7 +49,7 @@ class Nimbu::Auth
|
|
48
49
|
|
49
50
|
def associate_key(key)
|
50
51
|
display "Uploading SSH public key #{key}"
|
51
|
-
client.add_key(File.read(key))
|
52
|
+
client.add_key(File.read(key).force_encoding('UTF-8'))
|
52
53
|
end
|
53
54
|
end
|
54
55
|
end
|
data/lib/nimbu/version.rb
CHANGED
data/lib/vendor/nimbu/okjson.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: nimbu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Zenjoy BVBA
|
@@ -107,6 +107,22 @@ dependencies:
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
type: :runtime
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
version_requirements: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ~>
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0.9'
|
117
|
+
name: rb-fsevent
|
118
|
+
prerelease: false
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
121
|
+
requirements:
|
122
|
+
- - ~>
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.9'
|
125
|
+
type: :runtime
|
110
126
|
- !ruby/object:Gem::Dependency
|
111
127
|
version_requirements: !ruby/object:Gem::Requirement
|
112
128
|
none: false
|
@@ -341,7 +357,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
341
357
|
- !ruby/object:Gem::Version
|
342
358
|
segments:
|
343
359
|
- 0
|
344
|
-
hash:
|
360
|
+
hash: 1055533094181986828
|
345
361
|
version: '0'
|
346
362
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
347
363
|
none: false
|
@@ -350,7 +366,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
350
366
|
- !ruby/object:Gem::Version
|
351
367
|
segments:
|
352
368
|
- 0
|
353
|
-
hash:
|
369
|
+
hash: 1055533094181986828
|
354
370
|
version: '0'
|
355
371
|
requirements: []
|
356
372
|
rubyforge_project:
|