tdiary 4.0.3 → 4.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d869ad134fbca02c213d4e7215bd0a7b64c7942
4
- data.tar.gz: 87819fd2b48635c9bbc45749a189502b3465ebed
3
+ metadata.gz: 85434affa0930f2a4e2b50a08b36b97811a57474
4
+ data.tar.gz: 375d0121a198b0554ddd87e215b177d704a96c9d
5
5
  SHA512:
6
- metadata.gz: 33d153483c71348da5ea2851095924aeb621cacf1df7727ef3e6e27b357a7fda6b5ee4aa7498f58beb9073ab45e801addf5164cc1ac214d87d2c2911452d7a51
7
- data.tar.gz: 79b0620deeed57f18daf7869ace39f952e27ace3fc87ba3192a973b9bff19f156c4fd20029e526f5e3c808971c13bf7bf12b2d0edbf9bc19c4c15c5acff2322b
6
+ metadata.gz: 076059aba8fca8e10e9e3258270504acd284447072a230cb304735d738f0d4cbb4042685aef25885adb07cb06a11ed69f50becfe08892d5646aef1402af26f14
7
+ data.tar.gz: 35c4442fd0f86a3662b7e0e9c3c521061f2bbf4efd883d1d2de71b70ce20df47172a0317e260e0d2e51ff141d1261610c13fb984439fdff07616fd69937a4796
data/.gitignore CHANGED
@@ -15,3 +15,6 @@ spec/reports
15
15
  doc/*.html
16
16
  .rspec
17
17
  /Gemfile.local
18
+ spec/javascripts/lib
19
+ bower_components
20
+ node_modules
data/.travis.yml CHANGED
@@ -20,6 +20,8 @@ before_install:
20
20
 
21
21
  before_script:
22
22
  - DAEMON=1 bundle exec rake server
23
+ - npm install
24
+ - grunt
23
25
 
24
26
  script: if [ $TEST_MODE = "gem" ] ; then bundle exec tdiary test ; else bundle exec rake spec jasmine:ci test ; fi
25
27
 
data/ChangeLog CHANGED
@@ -1,3 +1,11 @@
1
+ 2014-05-29 TADA Tadashi <t@tdtds.jp>
2
+ * release 4.0.4
3
+
4
+ 2014-05-08 TADA Tadashi <t@tdtds.jp>
5
+ * fix error on image when edit mode #412
6
+ * remove mobile link discovery tag because it is obsolete.
7
+ * add default OGP
8
+
1
9
  2014-02-21 TADA Tadashi <t@tdtds.jp>
2
10
  * add theme_online plugin #291
3
11
 
data/Gemfile CHANGED
@@ -31,12 +31,12 @@ group :development do
31
31
  gem 'pry'
32
32
  gem 'test-unit'
33
33
  gem 'rspec', '~> 3.0.0.beta2'
34
- gem 'capybara', require: 'capybara/rspec', github: 'jnicklas/capybara'
34
+ gem 'capybara', require: 'capybara/rspec'
35
35
  gem 'selenium-webdriver'
36
36
  gem 'launchy'
37
37
  gem 'sequel'
38
38
  gem 'sqlite3'
39
- gem 'jasmine', '~> 1.3'
39
+ gem 'jasmine'
40
40
  gem 'simplecov', require: false
41
41
  gem 'coveralls', require: false
42
42
  end
data/Gemfile.lock CHANGED
@@ -1,19 +1,14 @@
1
- GIT
2
- remote: git://github.com/jnicklas/capybara.git
3
- revision: 595cd4a89bc5c7873e74a3b05761d27c30cc198a
1
+ GEM
2
+ remote: https://rubygems.org/
4
3
  specs:
5
- capybara (2.2.0)
4
+ addressable (2.3.6)
5
+ capybara (2.2.1)
6
6
  mime-types (>= 1.16)
7
7
  nokogiri (>= 1.3.3)
8
8
  rack (>= 1.0.0)
9
9
  rack-test (>= 0.5.4)
10
10
  xpath (~> 2.0)
11
-
12
- GEM
13
- remote: https://rubygems.org/
14
- specs:
15
- addressable (2.3.5)
16
- childprocess (0.5.1)
11
+ childprocess (0.5.3)
17
12
  ffi (~> 1.0, >= 1.0.11)
18
13
  coderay (1.1.0)
19
14
  coffee-script (2.2.0)
@@ -33,33 +28,34 @@ GEM
33
28
  execjs (2.0.2)
34
29
  faraday (0.9.0)
35
30
  multipart-post (>= 1.2, < 3)
36
- fastimage (1.6.0)
31
+ fastimage (1.6.2)
37
32
  addressable (~> 2.3, >= 2.3.5)
38
33
  ffi (1.9.3)
39
34
  hike (1.2.3)
40
- hikidoc (0.0.6)
41
- hub (1.11.2)
42
- jasmine (1.3.2)
43
- jasmine-core (~> 1.3.1)
44
- rack (~> 1.0)
45
- rspec (>= 1.3.1)
46
- selenium-webdriver (>= 0.1.3)
47
- jasmine-core (1.3.1)
35
+ hikidoc (0.1.0)
36
+ hub (1.12.0)
37
+ jasmine (2.0.1)
38
+ jasmine-core (~> 2.0.0)
39
+ phantomjs
40
+ rack (>= 1.2.1)
41
+ rake
42
+ jasmine-core (2.0.0)
48
43
  launchy (2.4.2)
49
44
  addressable (~> 2.3)
50
45
  libv8 (3.16.14.3)
51
46
  method_source (0.8.2)
52
- mime-types (2.1)
53
- mini_portile (0.5.2)
54
- multi_json (1.8.4)
47
+ mime-types (2.2)
48
+ mini_portile (0.6.0)
49
+ multi_json (1.10.0)
55
50
  multipart-post (2.0.0)
56
- nokogiri (1.6.1)
57
- mini_portile (~> 0.5.0)
58
- octokit (2.7.1)
59
- sawyer (~> 0.5.2)
60
- octorelease (0.0.4)
51
+ nokogiri (1.6.2.1)
52
+ mini_portile (= 0.6.0)
53
+ octokit (3.1.0)
54
+ sawyer (~> 0.5.3)
55
+ octorelease (0.0.6)
61
56
  hub
62
57
  octokit
58
+ phantomjs (1.9.7.0)
63
59
  pit (0.0.7)
64
60
  pry (0.9.12.6)
65
61
  coderay (~> 1.0)
@@ -71,40 +67,40 @@ GEM
71
67
  racksh (1.0.0)
72
68
  rack (>= 1.0)
73
69
  rack-test (>= 0.5)
74
- rake (10.1.1)
75
- redcarpet (3.1.1)
70
+ rake (10.3.2)
71
+ redcarpet (3.1.2)
76
72
  ref (1.0.5)
77
73
  rest-client (1.6.7)
78
74
  mime-types (>= 1.16)
79
- rspec (3.0.0.beta2)
80
- rspec-core (= 3.0.0.beta2)
81
- rspec-expectations (= 3.0.0.beta2)
82
- rspec-mocks (= 3.0.0.beta2)
83
- rspec-core (3.0.0.beta2)
84
- rspec-support (= 3.0.0.beta2)
85
- rspec-expectations (3.0.0.beta2)
75
+ rspec (3.0.0.rc1)
76
+ rspec-core (= 3.0.0.rc1)
77
+ rspec-expectations (= 3.0.0.rc1)
78
+ rspec-mocks (= 3.0.0.rc1)
79
+ rspec-core (3.0.0.rc1)
80
+ rspec-support (= 3.0.0.rc1)
81
+ rspec-expectations (3.0.0.rc1)
86
82
  diff-lcs (>= 1.2.0, < 2.0)
87
- rspec-support (= 3.0.0.beta2)
88
- rspec-mocks (3.0.0.beta2)
89
- rspec-support (= 3.0.0.beta2)
90
- rspec-support (3.0.0.beta2)
91
- rubyzip (1.1.0)
92
- sawyer (0.5.3)
83
+ rspec-support (= 3.0.0.rc1)
84
+ rspec-mocks (3.0.0.rc1)
85
+ rspec-support (= 3.0.0.rc1)
86
+ rspec-support (3.0.0.rc1)
87
+ rubyzip (1.1.3)
88
+ sawyer (0.5.4)
93
89
  addressable (~> 2.3.5)
94
90
  faraday (~> 0.8, < 0.10)
95
- selenium-webdriver (2.40.0)
91
+ selenium-webdriver (2.41.0)
96
92
  childprocess (>= 0.5.0)
97
93
  multi_json (~> 1.0)
98
94
  rubyzip (~> 1.0)
99
95
  websocket (~> 1.0.4)
100
- sequel (4.7.0)
96
+ sequel (4.10.0)
101
97
  simplecov (0.8.2)
102
98
  docile (~> 1.1.0)
103
99
  multi_json
104
100
  simplecov-html (~> 0.8.0)
105
101
  simplecov-html (0.8.0)
106
- slop (3.4.7)
107
- sprockets (2.11.0)
102
+ slop (3.5.0)
103
+ sprockets (2.12.1)
108
104
  hike (~> 1.2)
109
105
  multi_json (~> 1.0)
110
106
  rack (~> 1.0)
@@ -116,13 +112,13 @@ GEM
116
112
  therubyracer (0.12.1)
117
113
  libv8 (~> 3.16.14.0)
118
114
  ref
119
- thin (1.6.1)
115
+ thin (1.6.2)
120
116
  daemons (>= 1.0.9)
121
117
  eventmachine (>= 1.0.0)
122
118
  rack (>= 1.0.0)
123
- thor (0.18.1)
119
+ thor (0.19.1)
124
120
  tilt (1.4.1)
125
- tins (1.0.0)
121
+ tins (1.3.0)
126
122
  websocket (1.0.7)
127
123
  xpath (2.0.0)
128
124
  nokogiri (~> 1.3)
@@ -131,12 +127,12 @@ PLATFORMS
131
127
  ruby
132
128
 
133
129
  DEPENDENCIES
134
- capybara!
130
+ capybara
135
131
  coffee-script
136
132
  coveralls
137
133
  fastimage
138
134
  hikidoc
139
- jasmine (~> 1.3)
135
+ jasmine
140
136
  launchy
141
137
  octorelease
142
138
  pit
data/Gruntfile.js ADDED
@@ -0,0 +1,24 @@
1
+ module.exports = function (grunt) {
2
+ 'use strict';
3
+ grunt.initConfig({
4
+ dir: {
5
+ src: 'src',
6
+ dest: 'dist'
7
+ },
8
+ pkg: grunt.file.readJSON("package.json"),
9
+ bower: {
10
+ install: {
11
+ options: {
12
+ targetDir: './spec/javascripts/lib',
13
+ layout: 'byComponent',
14
+ install: true,
15
+ verbose: false,
16
+ cleanTargetDir: true,
17
+ cleanBowerDir: false
18
+ }
19
+ }
20
+ },
21
+ });
22
+ grunt.loadNpmTasks('grunt-bower-task');
23
+ grunt.registerTask('default', ['bower:install']);
24
+ };
data/bower.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "tdiary-core",
3
+ "version": "4.0.3",
4
+ "homepage": "https://github.com/tdiary/tdiary-core",
5
+ "authors": [
6
+ "SHIBATA Hiroshi <hsbt@ruby-lang.org>"
7
+ ],
8
+ "license": "GPL",
9
+ "ignore": [
10
+ "**/.*",
11
+ "node_modules",
12
+ "bower_components",
13
+ "spec/javascripts/lib"
14
+ ],
15
+ "devDependencies": {
16
+ "jquery": "~2.1.0",
17
+ "jasmine-jquery": "~2.0.3"
18
+ }
19
+ }
data/js/00default.js CHANGED
@@ -12,6 +12,50 @@ $tDiary = new Object();
12
12
  $tDiary.plugin = new Object();
13
13
  $tDiary.blogkit = false;
14
14
 
15
+ /*
16
+ * https://github.com/jquery/jquery/blob/1.8.3/src/deprecated.js
17
+ */
18
+
19
+ (function() {
20
+ var matched, browser;
21
+
22
+ // Use of jQuery.browser is frowned upon.
23
+ // More details: http://api.jquery.com/jQuery.browser
24
+ // jQuery.uaMatch maintained for back-compat
25
+ jQuery.uaMatch = function( ua ) {
26
+ ua = ua.toLowerCase();
27
+
28
+ var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
29
+ /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
30
+ /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
31
+ /(msie) ([\w.]+)/.exec( ua ) ||
32
+ ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
33
+ [];
34
+
35
+ return {
36
+ browser: match[ 1 ] || "",
37
+ version: match[ 2 ] || "0"
38
+ };
39
+ };
40
+
41
+ matched = jQuery.uaMatch( navigator.userAgent );
42
+ browser = {};
43
+
44
+ if ( matched.browser ) {
45
+ browser[ matched.browser ] = true;
46
+ browser.version = matched.version;
47
+ }
48
+
49
+ // Chrome is Webkit, but Webkit is also Safari.
50
+ if ( browser.chrome ) {
51
+ browser.webkit = true;
52
+ } else if ( browser.webkit ) {
53
+ browser.safari = true;
54
+ }
55
+
56
+ jQuery.browser = browser;
57
+ })();
58
+
15
59
  /*
16
60
  utility functions
17
61
  */
@@ -5,7 +5,6 @@
5
5
  # usage:
6
6
  # 1) Get your free API Key from:
7
7
  # a. Akismet API from http://akismet.com/personal/
8
- # b. TypePad Antispam API from http://antispam.typepad.com/info/get-api-key.html
9
8
  # 2) Set the API key and enable filter in your tdiary.conf. See below.
10
9
  # @options['antispam.service'] = 'rest.akismet.com'
11
10
  # @options['antispam.key'] = '1234567890ab'
@@ -25,7 +24,6 @@ module TDiary::Filter
25
24
  @antispam_service_list = {
26
25
  # Service => ServiceHost
27
26
  'Akismet' => 'rest.akismet.com',
28
- 'TypePad' => 'api.antispam.typepad.com'
29
27
  }
30
28
 
31
29
  host = @antispam_service_list[@conf['antispam.service']]
@@ -13,7 +13,6 @@ require 'uri'
13
13
  @antispam_service_list = {
14
14
  # Service => ServiceHost
15
15
  'Akismet' => 'rest.akismet.com',
16
- 'TypePad' => 'api.antispam.typepad.com'
17
16
  }
18
17
 
19
18
  add_conf_proc( 'antispamservice', @antispam_label_conf, 'security' ) do
@@ -238,7 +238,8 @@ class Weather
238
238
  [%r[\s*\b(mostly |partly )clear\b\s*]i, '"晴"'],
239
239
  [%r[\s*\bclear\b\s*]i, '"快晴"'],
240
240
  [%r[\s*\b(mostly |partly )?cloudy\b\s*]i, '"曇"'],
241
- [%r[\s*\bovercast\b\s*]i, '"曇"'],
241
+ [%r[\s*\bbroken clouds\b\s*]i, '"曇"'],
242
+ [%r[\s*\bovercast( cloud deck)?\b\s*]i, '"曇"'],
242
243
  [%r[\s*\blight snow showers?\b\s*]i, '"にわか雪"'],
243
244
  [%r[\s*\blight snow\b\s*]i, '"小雪"'],
244
245
  [%r[\s*\blight drizzle\b\s*]i, '"小雨"'],
data/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "tdiary-core",
3
+ "version": "4.0.3",
4
+ "description": "",
5
+ "main": "",
6
+ "directories": {
7
+ "doc": "doc",
8
+ "test": "test"
9
+ },
10
+ "scripts": {
11
+ "test": "echo \"Error: no test specified\" && exit 1"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git://github.com/tdiary/tdiary-core.git"
16
+ },
17
+ "author": "",
18
+ "license": "GPL",
19
+ "bugs": {
20
+ "url": "https://github.com/tdiary/tdiary-core/issues"
21
+ },
22
+ "homepage": "https://github.com/tdiary/tdiary-core",
23
+ "devDependencies": {
24
+ "bower": "~1.2.8",
25
+ "grunt": "~0.4.4",
26
+ "grunt-cli": "~0.1.13",
27
+ "grunt-bower-task": "~0.3.4"
28
+ }
29
+ }
data/plugin/00default.rb CHANGED
@@ -211,8 +211,8 @@ add_header_proc do
211
211
  #{author_name_tag}
212
212
  #{author_mail_tag}
213
213
  #{index_page_tag}
214
- #{mobile_link_discovery}
215
214
  #{icon_tag}
215
+ #{default_ogp}
216
216
  #{description_tag}
217
217
  #{jquery_tag.chomp}
218
218
  #{script_tag.chomp}
@@ -321,17 +321,6 @@ def index_page_tag
321
321
  result.chop.chop
322
322
  end
323
323
 
324
- def mobile_link_discovery
325
- return '' unless /^(latest|day)$/ =~ @mode
326
- uri = @conf.index.dup
327
- uri[0, 0] = base_url if %r|^https?://|i !~ @conf.index
328
- uri.gsub!( %r|/\./|, '/' )
329
- if @mode == 'day' then
330
- uri += anchor( @date.strftime( '%Y%m%d' ) )
331
- end
332
- %Q[<link rel="alternate" media="handheld" type="text/html" href="#{h uri}">]
333
- end
334
-
335
324
  def icon_tag
336
325
  if @conf.icon and not(@conf.icon.empty?) then
337
326
  if /\.ico$/ =~ @conf.icon then
@@ -344,6 +333,25 @@ def icon_tag
344
333
  end
345
334
  end
346
335
 
336
+ def default_ogp
337
+ if @conf.options2['sp.selected'] && @conf.options2['sp.selected'].include?('ogp.rb')
338
+ if defined?(@conf.banner)
339
+ %Q[<meta content="#{base_url}images/ogimage.png" property="og:image">]
340
+ end
341
+ else
342
+ uri = @conf.index.dup
343
+ uri[0, 0] = base_url if %r|^https?://|i !~ @conf.index
344
+ uri.gsub!( %r|/\./|, '/' )
345
+ if @mode == 'day' then
346
+ uri += anchor( @date.strftime( '%Y%m%d' ) )
347
+ end
348
+ %Q[<meta content="#{title_tag.gsub(/<[^>]*>/, "")}" property="og:title">
349
+ <meta content="#{(@mode == 'day') ? 'article' : 'website'}" property="og:type">
350
+ <meta content="#{h uri}#{h theme_url}/ogimage.png" property="og:image">
351
+ <meta content="#{h uri}" property="og:url">]
352
+ end
353
+ end
354
+
347
355
  def description_tag
348
356
  if @conf.description and not(@conf.description.empty?) then
349
357
  %Q[<meta name="description" content="#{h @conf.description}">]
@@ -571,13 +579,13 @@ end
571
579
  # make comment form
572
580
  #
573
581
  def comment_description
574
- begin
575
- if @conf.options['comment_description'].length > 0 then
576
- return @conf.options['comment_description']
577
- end
578
- rescue
579
- end
580
- comment_description_default
582
+ begin
583
+ if @conf.options['comment_description'].length > 0 then
584
+ return @conf.options['comment_description']
585
+ end
586
+ rescue
587
+ end
588
+ comment_description_default
581
589
  end
582
590
 
583
591
  def comment_form_text
@@ -5,7 +5,7 @@ require 'tdiary/io/default'
5
5
 
6
6
  describe TDiary::IO::Default do
7
7
  it 'is_a TDiary::IO::Base' do
8
- expect { TDiary::IO::Default.is_a?(TDiary::IO::Base) }.to be_truthy
8
+ expect(TDiary::IO::Default.ancestors.include?(TDiary::IO::Base)).to be_truthy
9
9
  end
10
10
 
11
11
  describe "#save_cgi_conf and #load_cgi_conf" do
@@ -1,5 +1,6 @@
1
1
  src_files:
2
- - "spec/javascripts/jquery.js"
2
+ - "spec/javascripts/lib/jquery/jquery.js"
3
+ - "spec/javascripts/lib/**/*.js"
3
4
  - "js/**/*.js"
4
5
 
5
6
  stylesheets:
@@ -62,7 +62,9 @@ module TDiary
62
62
 
63
63
  def create_tdiary
64
64
  begin
65
- if params['append']
65
+ if params['plugin']
66
+ tdiary = TDiary::TDiaryFormPlugin::new( cgi, 'update.rhtml', conf )
67
+ elsif params['append']
66
68
  tdiary = TDiary::TDiaryAppend::new( cgi, nil, conf )
67
69
  elsif params['edit']
68
70
  tdiary = TDiary::TDiaryEdit::new( cgi, 'update.rhtml', conf )
@@ -70,8 +72,6 @@ module TDiary
70
72
  tdiary = TDiary::TDiaryReplace::new( cgi, nil, conf )
71
73
  elsif params['appendpreview'] or params['replacepreview']
72
74
  tdiary = TDiary::TDiaryPreview::new( cgi, 'preview.rhtml', conf )
73
- elsif params['plugin']
74
- tdiary = TDiary::TDiaryFormPlugin::new( cgi, 'update.rhtml', conf )
75
75
  elsif params['comment']
76
76
  tdiary = TDiary::TDiaryShowComment::new( cgi, 'update.rhtml', conf )
77
77
  elsif params['saveconf']
@@ -39,11 +39,17 @@ def make_tarball( repo, version = nil )
39
39
  Dir.chdir '.bundle/ruby' do
40
40
  v = `ls`.chomp
41
41
  case v
42
+ when '2.1.0'
43
+ FileUtils.cp_r '2.1.0', '1.9.1'
44
+ FileUtils.cp_r '2.1.0', '2.0.0'
42
45
  when '2.0.0'
43
46
  FileUtils.cp_r '2.0.0', '1.9.1'
47
+ FileUtils.cp_r '2.0.0', '2.1.0'
44
48
  when '1.9.1'
45
49
  FileUtils.cp_r '1.9.1', '2.0.0'
50
+ FileUtils.cp_r '1.9.1', '2.1.0'
46
51
  else
52
+ FileUtils.cp_r v, '2.1.0'
47
53
  FileUtils.cp_r v, '2.0.0'
48
54
  FileUtils.cp_r v, '1.9.1'
49
55
  FileUtils.rm_rf v
data/tdiary/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TDiary
2
- VERSION = '4.0.3'
2
+ VERSION = '4.0.4'
3
3
  end
@@ -76,11 +76,11 @@ module TDiary
76
76
  end
77
77
 
78
78
  def StubPlugin::load_plugin(plugin_relative_path, lang = 'en')
79
- return StubPlugin::_load_plugin(plugin_relative_path, lang = 'en')[1]
79
+ return StubPlugin::_load_plugin(plugin_relative_path, lang)[1]
80
80
  end
81
81
 
82
82
  def StubPlugin::new_plugin(plugin_relative_path, lang = 'en')
83
- return StubPlugin::_load_plugin(plugin_relative_path, lang = 'en')[0]
83
+ return StubPlugin::_load_plugin(plugin_relative_path, lang)[0]
84
84
  end
85
85
 
86
86
  attr_accessor :conf
@@ -126,11 +126,11 @@ module TDiary
126
126
  end
127
127
 
128
128
  def StubPlugin::load_plugin(plugin_relative_path, lang = 'en')
129
- return StubPlugin::_load_plugin(plugin_relative_path, lang = 'en')[1]
129
+ return StubPlugin::_load_plugin(plugin_relative_path, lang)[1]
130
130
  end
131
131
 
132
132
  def StubPlugin::new_plugin(plugin_relative_path, lang = 'en')
133
- return StubPlugin::_load_plugin(plugin_relative_path, lang = 'en')[0]
133
+ return StubPlugin::_load_plugin(plugin_relative_path, lang)[0]
134
134
  end
135
135
 
136
136
  def initialize(lang = 'en')
data/test/weather_test.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  # by @kou
2
3
  # https://github.com/tdiary/tdiary-core/pull/218#issuecomment-10048898
3
4
 
@@ -144,6 +145,30 @@ class TestStationRegexp < Test::Unit::TestCase
144
145
  end
145
146
  end
146
147
 
148
+ class TestWeatherTranslaterJa < Test::Unit::TestCase
149
+ def setup
150
+ @plugin_class = TDiary::StubPlugin::new_plugin('misc/plugin/weather.rb', 'ja')
151
+ end
152
+
153
+ def test_translate_broken_clouds
154
+ ja = @plugin_class::WeatherTranslator::S.new('broken clouds').\
155
+ translate(@plugin_class::Weather::Words_ja)
156
+ assert_equal('曇', ja)
157
+ end
158
+
159
+ def test_translate_overcast_clouod_deck
160
+ ja = @plugin_class::WeatherTranslator::S.new('overcast cloud deck').\
161
+ translate(@plugin_class::Weather::Words_ja)
162
+ assert_equal('曇', ja)
163
+ end
164
+
165
+ def test_translate_overcast
166
+ ja = @plugin_class::WeatherTranslator::S.new('overcast').\
167
+ translate(@plugin_class::Weather::Words_ja)
168
+ assert_equal('曇', ja)
169
+ end
170
+ end
171
+
147
172
  # Stub for @conf
148
173
  class WeatherStubConf
149
174
  def to_native(str); str; end
data/theme/ogimage.png ADDED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdiary
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - TADA Tadashi
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-02-28 00:00:00.000000000 Z
13
+ date: 2014-05-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -54,11 +54,13 @@ files:
54
54
  - ChangeLog
55
55
  - Gemfile
56
56
  - Gemfile.lock
57
+ - Gruntfile.js
57
58
  - LICENSE
58
59
  - Procfile
59
60
  - README.md
60
61
  - Rakefile
61
62
  - bin/tdiary
63
+ - bower.json
62
64
  - config.ru
63
65
  - data/.htaccess
64
66
  - doc/HOWTO-authenticate-in-rack.md
@@ -245,6 +247,7 @@ files:
245
247
  - misc/theme_convert/Readme.rd
246
248
  - misc/theme_convert/append.rcss
247
249
  - misc/theme_convert/theme_convert.rb
250
+ - package.json
248
251
  - plugin/00default.rb
249
252
  - plugin/05referer.rb
250
253
  - plugin/10spamfilter.rb
@@ -332,8 +335,6 @@ files:
332
335
  - spec/fixtures/tdiary.conf.webrick
333
336
  - spec/javascripts/00default_spec.js
334
337
  - spec/javascripts/fixtures/00default.html
335
- - spec/javascripts/helpers/jasmine-jquery.js
336
- - spec/javascripts/jquery.js
337
338
  - spec/javascripts/support/jasmine.yml
338
339
  - spec/plugin/bq_spec.rb
339
340
  - spec/plugin/plugin_helper.rb
@@ -417,6 +418,7 @@ files:
417
418
  - theme/default/default.css
418
419
  - theme/help.png
419
420
  - theme/loading.gif
421
+ - theme/ogimage.png
420
422
  - theme/tdiary1/README
421
423
  - theme/tdiary1/tdiary1.css
422
424
  - theme/tdiary2/README
@@ -491,8 +493,6 @@ test_files:
491
493
  - spec/fixtures/tdiary.conf.webrick
492
494
  - spec/javascripts/00default_spec.js
493
495
  - spec/javascripts/fixtures/00default.html
494
- - spec/javascripts/helpers/jasmine-jquery.js
495
- - spec/javascripts/jquery.js
496
496
  - spec/javascripts/support/jasmine.yml
497
497
  - spec/plugin/bq_spec.rb
498
498
  - spec/plugin/plugin_helper.rb