ymdp 1.2.0 → 1.3.0
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/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
@@ -284,7 +284,15 @@ module YMDP
|
|
284
284
|
end
|
285
285
|
|
286
286
|
def process_scss(template, filename=nil)
|
287
|
-
|
287
|
+
options = {
|
288
|
+
:syntax => :scss
|
289
|
+
}
|
290
|
+
if filename
|
291
|
+
options[:filename] = filename
|
292
|
+
end
|
293
|
+
::Sass::Engine.new(template, options).render(self) do
|
294
|
+
yield
|
295
|
+
end
|
288
296
|
end
|
289
297
|
|
290
298
|
# Write this template with the application layout applied.
|
@@ -10,7 +10,7 @@
|
|
10
10
|
GLOBAL CONSTANTS
|
11
11
|
###
|
12
12
|
|
13
|
-
window.View =
|
13
|
+
window.View =
|
14
14
|
application: "<%= @application_name %>"
|
15
15
|
domain: "<%= @domain %>"
|
16
16
|
page_loaded: false
|
@@ -31,7 +31,7 @@ String.prototype.capitalize = () ->
|
|
31
31
|
|
32
32
|
|
33
33
|
|
34
|
-
window.YMDP =
|
34
|
+
window.YMDP =
|
35
35
|
Constants: {}
|
36
36
|
|
37
37
|
# Shows the error view.
|
@@ -77,10 +77,13 @@ window.YMDP =
|
|
77
77
|
setTimeout(callback_function, interval * 1000)
|
78
78
|
|
79
79
|
showTranslations: () ->
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
80
|
+
try
|
81
|
+
Debug.log("begin YMDP.showTranslations")
|
82
|
+
I18n.findAndTranslateAll()
|
83
|
+
|
84
|
+
# define I18n.localTranslations in the view template
|
85
|
+
I18n.localTranslations()
|
86
|
+
|
87
|
+
Debug.log("end YMDP.showTranslations")
|
88
|
+
catch omg
|
89
|
+
Debug.error(omg.message)
|
@@ -55,15 +55,23 @@ I18n.translate_element = function(element) {
|
|
55
55
|
// the returned translated string
|
56
56
|
//
|
57
57
|
I18n.translate = function(key, args) {
|
58
|
+
Debug.log("I18n.translate", key, args);
|
59
|
+
|
58
60
|
key = key.toUpperCase();
|
59
61
|
key = key.replace(" ", "_");
|
62
|
+
|
63
|
+
Debug.log("key", key);
|
64
|
+
|
60
65
|
if (args) {
|
61
66
|
var m;
|
62
67
|
m = I18n.translate_sentence(key, args);
|
68
|
+
Debug.log("args existed");
|
63
69
|
} else
|
64
70
|
{
|
65
71
|
m = I18n.translate_phrase(key);
|
72
|
+
Debug.log("no args");
|
66
73
|
}
|
74
|
+
Debug.log("Here is m", m);
|
67
75
|
return m;
|
68
76
|
};
|
69
77
|
I18n.t = I18n.translate;
|
@@ -27,6 +27,7 @@ module YMDP
|
|
27
27
|
Dir["./config/locales/**/*.yml"].each do |file|
|
28
28
|
@translations.merge!(YAML.load_file(file))
|
29
29
|
end
|
30
|
+
|
30
31
|
@translations
|
31
32
|
end
|
32
33
|
|
@@ -397,7 +398,12 @@ module YMDP
|
|
397
398
|
|
398
399
|
filenames.map! do |filename|
|
399
400
|
filename.gsub!(/\.css$/, "")
|
400
|
-
"#{BASE_PATH}/app/stylesheets/#{filename}.css"
|
401
|
+
f = "#{BASE_PATH}/app/stylesheets/#{filename}.css"
|
402
|
+
if !File.exists?(f)
|
403
|
+
f = "#{BASE_PATH}/app/stylesheets/#{filename}.scss"
|
404
|
+
else
|
405
|
+
$stdout.puts("Could not find #{filename}.css or #{filename}.scss")
|
406
|
+
end
|
401
407
|
end
|
402
408
|
|
403
409
|
output = combine_files(filenames)
|
@@ -420,7 +426,8 @@ module YMDP
|
|
420
426
|
# Renders together a set of files without
|
421
427
|
# compression, so they can be compressed as a single block.
|
422
428
|
#
|
423
|
-
def render_without_compression(path, tags=true)
|
429
|
+
def render_without_compression(path="", tags=true)
|
430
|
+
path ||= ""
|
424
431
|
output = ""
|
425
432
|
|
426
433
|
if File.exists?("#{path}.coffee")
|
data/ymdp.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ymdp"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Isaac Priestley"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-06-01"
|
13
13
|
s.description = "Framework for developing applications in the Yahoo! Mail Development Platform."
|
14
14
|
s.email = "progressions@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ymdp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 3
|
9
9
|
- 0
|
10
|
-
version: 1.
|
10
|
+
version: 1.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Isaac Priestley
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-06-01 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
type: :runtime
|