tdiary 4.0.2 → 4.0.2.20140201
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 +4 -4
- data/.travis.yml +2 -0
- data/Gemfile +8 -7
- data/Gemfile.lock +17 -15
- data/config.ru +0 -2
- data/doc/INSTALL-paas.md +17 -5
- data/misc/plugin/amazon/amazonimg.rb +1 -1
- data/misc/plugin/category.rb +7 -7
- data/misc/plugin/image.rb +4 -1
- data/misc/plugin/search-default.rb +269 -0
- data/misc/theme_convert/theme_convert.rb +3 -3
- data/plugin/50sp.rb +3 -2
- data/spec/acceptance/append_comment_spec.rb +8 -8
- data/spec/acceptance/append_diary_spec.rb +9 -9
- data/spec/acceptance/save_conf_comment_spec.rb +7 -7
- data/spec/acceptance/save_conf_default_spec.rb +31 -31
- data/spec/acceptance/save_conf_dnsbl_spec.rb +28 -28
- data/spec/acceptance/save_conf_referer_spec.rb +6 -6
- data/spec/acceptance/save_conf_security_spec.rb +37 -37
- data/spec/acceptance/support/helpers.rb +8 -8
- data/spec/acceptance/update_diary_spec.rb +21 -21
- data/spec/acceptance/view_category_spec.rb +5 -5
- data/spec/acceptance/view_comment_spec.rb +6 -6
- data/spec/acceptance/view_diary_spec.rb +12 -12
- data/spec/acceptance/view_referer_spec.rb +3 -3
- data/spec/acceptance_helper.rb +2 -2
- data/spec/core/configuration_spec.rb +1 -1
- data/spec/core/io/default_spec.rb +30 -2
- data/spec/core/plugin_spec.rb +1 -1
- data/tdiary/application/configuration.rb +0 -1
- data/tdiary/application/extensions/omniauth.rb +1 -1
- data/tdiary/application.rb +6 -9
- data/tdiary/cli.rb +6 -6
- data/tdiary/configuration.rb +2 -2
- data/tdiary/extensions/core.rb +18 -0
- data/tdiary/extensions.rb +6 -0
- data/tdiary/io/base.rb +11 -7
- data/tdiary/lang/ja.rb +2 -2
- data/tdiary/server.rb +1 -1
- data/tdiary/version.rb +1 -1
- data/tdiary.rb +2 -1
- data/test/test_plugin_helper.rb +54 -10
- data/test/test_plugin_helper_test.rb +27 -5
- data/test/weather_test.rb +26 -22
- data/tmp/.gitkeep +0 -0
- metadata +7 -3
| @@ -2,7 +2,9 @@ | |
| 2 2 | 
             
            require File.expand_path('../test_helper', __FILE__)
         | 
| 3 3 | 
             
            require File.expand_path('../test_plugin_helper', __FILE__)
         | 
| 4 4 |  | 
| 5 | 
            -
            class  | 
| 5 | 
            +
            class TestPluginTestHelper < Test::Unit::TestCase
         | 
| 6 | 
            +
            	include TDiary::PluginTestHelper
         | 
| 7 | 
            +
             | 
| 6 8 | 
             
            	def test_absolute_path_of
         | 
| 7 9 | 
             
            		abspath = File.expand_path(File.join(File.dirname(__FILE__), '..', 'plugin', '00default.rb'))
         | 
| 8 10 | 
             
            		assert_equal(abspath, TDiary::PluginTestHelper.absolute_path_of('plugin/00default.rb'))
         | 
| @@ -18,11 +20,31 @@ class TestPluginHelper < TDiary::PluginTestCase | |
| 18 20 | 
             
            		assert_equal(abspath, TDiary::PluginTestHelper.resource_relative_path_of('plugin/00default.rb', 'en'))
         | 
| 19 21 | 
             
            	end
         | 
| 20 22 |  | 
| 21 | 
            -
            	def  | 
| 22 | 
            -
            		assert_nothing_raised | 
| 23 | 
            +
            	def test_new_plugin
         | 
| 24 | 
            +
            		assert_nothing_raised do
         | 
| 25 | 
            +
            			TDiary::StubPlugin::new_plugin('plugin/00default.rb', 'en')
         | 
| 26 | 
            +
            		end
         | 
| 27 | 
            +
            	end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            	def test_load_plugin
         | 
| 30 | 
            +
            		assert_nothing_raised do
         | 
| 31 | 
            +
            			TDiary::StubPlugin::load_plugin('plugin/00default.rb', 'en')
         | 
| 32 | 
            +
            		end
         | 
| 33 | 
            +
            	end
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            	def test_plugin_conf
         | 
| 36 | 
            +
            		plugin = TDiary::StubPlugin::load_plugin('plugin/00default.rb', 'en')
         | 
| 37 | 
            +
            		assert_nothing_raised do
         | 
| 38 | 
            +
            			plugin.conf['key'] = 'value'
         | 
| 39 | 
            +
            		end
         | 
| 40 | 
            +
            		assert_equal('value', plugin.conf['key'])
         | 
| 23 41 | 
             
            	end
         | 
| 24 42 |  | 
| 25 | 
            -
            	def  | 
| 26 | 
            -
            		 | 
| 43 | 
            +
            	def test_plugin_options
         | 
| 44 | 
            +
            		plugin = TDiary::StubPlugin::load_plugin('plugin/00default.rb', 'en')
         | 
| 45 | 
            +
            		assert_nothing_raised do
         | 
| 46 | 
            +
            			plugin.options['key'] = 'value'
         | 
| 47 | 
            +
            		end
         | 
| 48 | 
            +
            		assert_equal('value', plugin.options['key'])
         | 
| 27 49 | 
             
            	end
         | 
| 28 50 | 
             
            end
         | 
    
        data/test/weather_test.rb
    CHANGED
    
    | @@ -1,33 +1,37 @@ | |
| 1 | 
            +
            # by @kou
         | 
| 2 | 
            +
            # https://github.com/tdiary/tdiary-core/pull/218#issuecomment-10048898
         | 
| 3 | 
            +
             | 
| 1 4 | 
             
            require File.expand_path('../test_helper', __FILE__)
         | 
| 2 5 | 
             
            require File.expand_path('../test_plugin_helper', __FILE__)
         | 
| 3 6 |  | 
| 4 7 | 
             
            module EmptyRenderingTests
         | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 8 | 
            +
                def setup
         | 
| 9 | 
            +
                    @plugin_class = TDiary::StubPlugin::new_plugin('misc/plugin/weather.rb', language)
         | 
| 10 | 
            +
                    @weather = @plugin_class::Weather.new
         | 
| 11 | 
            +
                end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                def test_empty_rendering_to_html
         | 
| 14 | 
            +
                    assert_equal('', @weather.to_html)
         | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                def test_empty_rendering_to_i_html
         | 
| 18 | 
            +
                    assert_equal('', @weather.to_i_html)
         | 
| 19 | 
            +
                end
         | 
| 17 20 | 
             
            end
         | 
| 18 21 |  | 
| 19 | 
            -
            class TestEmptyRenderingEn <  | 
| 20 | 
            -
             | 
| 22 | 
            +
            class TestEmptyRenderingEn < Test::Unit::TestCase
         | 
| 23 | 
            +
                include EmptyRenderingTests
         | 
| 21 24 |  | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            +
                def language
         | 
| 26 | 
            +
                    "en"
         | 
| 27 | 
            +
                end
         | 
| 25 28 | 
             
            end
         | 
| 26 29 |  | 
| 27 | 
            -
            class TestEmptyRenderingJa <  | 
| 28 | 
            -
             | 
| 30 | 
            +
            class TestEmptyRenderingJa < Test::Unit::TestCase
         | 
| 31 | 
            +
                include EmptyRenderingTests
         | 
| 29 32 |  | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            +
                def language
         | 
| 34 | 
            +
                    "ja"
         | 
| 35 | 
            +
                end
         | 
| 33 36 | 
             
            end
         | 
| 37 | 
            +
             | 
    
        data/tmp/.gitkeep
    ADDED
    
    | 
            File without changes
         | 
    
        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.2
         | 
| 4 | 
            +
              version: 4.0.2.20140201
         | 
| 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:  | 
| 13 | 
            +
            date: 2014-02-01 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: thor
         | 
| @@ -223,6 +223,7 @@ files: | |
| 223 223 | 
             
            - misc/plugin/referer-antibot.rb
         | 
| 224 224 | 
             
            - misc/plugin/referer-utf8.rb
         | 
| 225 225 | 
             
            - misc/plugin/referer_scheme.rb
         | 
| 226 | 
            +
            - misc/plugin/search-default.rb
         | 
| 226 227 | 
             
            - misc/plugin/search_control.rb
         | 
| 227 228 | 
             
            - misc/plugin/search_form.rb
         | 
| 228 229 | 
             
            - misc/plugin/sn.rb
         | 
| @@ -358,6 +359,8 @@ files: | |
| 358 359 | 
             
            - tdiary/dispatcher/index_main.rb
         | 
| 359 360 | 
             
            - tdiary/dispatcher/update_main.rb
         | 
| 360 361 | 
             
            - tdiary/environment.rb
         | 
| 362 | 
            +
            - tdiary/extensions.rb
         | 
| 363 | 
            +
            - tdiary/extensions/core.rb
         | 
| 361 364 | 
             
            - tdiary/filter.rb
         | 
| 362 365 | 
             
            - tdiary/filter/default.rb
         | 
| 363 366 | 
             
            - tdiary/filter/spam.rb
         | 
| @@ -414,6 +417,7 @@ files: | |
| 414 417 | 
             
            - theme/tdiary1/tdiary1.css
         | 
| 415 418 | 
             
            - theme/tdiary2/README
         | 
| 416 419 | 
             
            - theme/tdiary2/tdiary2.css
         | 
| 420 | 
            +
            - tmp/.gitkeep
         | 
| 417 421 | 
             
            - update.fcgi
         | 
| 418 422 | 
             
            - update.rb
         | 
| 419 423 | 
             
            - vendor/.gitkeep
         | 
| @@ -437,7 +441,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 437 441 | 
             
                  version: '0'
         | 
| 438 442 | 
             
            requirements: []
         | 
| 439 443 | 
             
            rubyforge_project: 
         | 
| 440 | 
            -
            rubygems_version: 2.2. | 
| 444 | 
            +
            rubygems_version: 2.2.1
         | 
| 441 445 | 
             
            signing_key: 
         | 
| 442 446 | 
             
            specification_version: 4
         | 
| 443 447 | 
             
            summary: a TSUKKOMI-able Web-log
         |