autoreload 0.0.1 → 0.2.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.
metadata CHANGED
@@ -1,73 +1,76 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.2
3
- specification_version: 1
4
2
  name: autoreload
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.0.1
7
- date: 2007-07-05 00:00:00 +09:00
8
- summary: description of gem
9
- require_paths:
10
- - lib
11
- email: FIXME email
12
- homepage: http://autoreload.rubyforge.org
13
- rubyforge_project: autoreload
14
- description: description of gem
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 2
8
+ - 0
9
+ version: 0.2.0
25
10
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
11
  authors:
30
- - FIXME full name
12
+ - Kouichirou Eto
13
+ - Thomas Sawyer
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-06-02 00:00:00 -04:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: Autoreload automatically reloads library files when they have been updated. It is especailly useful when testing stateless services such as web applications.
23
+ email: rubyworks-mailinglist@googlegroups.com
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files:
29
+ - README.rdoc
31
30
  files:
32
- - Changes.txt
33
- - History.txt
34
- - License.txt
35
- - Manifest.txt
36
- - README.txt
37
- - Rakefile
38
- - default_task.rb
39
- - examples/foo.rb
40
- - examples/sample1.rb
31
+ - lib/autoreload/lookup.rb
32
+ - lib/autoreload/reloader.rb
41
33
  - lib/autoreload.rb
42
- - scripts/lib-txt2html.rb
43
- - scripts/makemanifest.rb
44
- - scripts/txt2html
45
- - setup.rb
46
- - test/test_autoreload.rb
47
- - test/test_helper.rb
48
- - website/index.html
49
- - website/index.txt
50
- - website/javascripts/rounded_corners_lite.inc.js
51
- - website/stylesheets/screen.css
52
- - website/template.rhtml
53
- test_files:
54
34
  - test/test_autoreload.rb
55
35
  - test/test_helper.rb
36
+ - PROFILE
37
+ - LICENSE
38
+ - README.rdoc
39
+ - HISTORY
40
+ - VERSION
41
+ has_rdoc: true
42
+ homepage: http://rubyworks.github.com/autoreload
43
+ licenses: []
44
+
45
+ post_install_message:
56
46
  rdoc_options:
47
+ - --title
48
+ - Autoreload API
57
49
  - --main
58
- - README.txt
59
- extra_rdoc_files:
60
- - Changes.txt
61
- - History.txt
62
- - License.txt
63
- - Manifest.txt
64
- - README.txt
65
- - website/index.txt
66
- executables: []
67
-
68
- extensions: []
69
-
50
+ - README.rdoc
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ segments:
65
+ - 0
66
+ version: "0"
70
67
  requirements: []
71
68
 
72
- dependencies: []
73
-
69
+ rubyforge_project: autoreload
70
+ rubygems_version: 1.3.6
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: Automatically reload library files
74
+ test_files:
75
+ - test/test_autoreload.rb
76
+ - test/test_helper.rb
@@ -1,48 +0,0 @@
1
- == 2007-07-05
2
-
3
- * Changes.txt: New file. Moved from ChangeLog.
4
- * ChangeLog: Deleted.
5
-
6
- * bin: Deleted.
7
-
8
- * lib/autoreload.rb: Make it start from class method.
9
-
10
- * lib/autoreload/version.rb: Removed.
11
-
12
- * lib/autoreload.rb: Reformat.
13
-
14
- * examples/sample1.rb: New file.
15
- * examples/foo.rb: New file.
16
-
17
- * default_task.rb: New file. Splited from Rakefile.
18
- * Rakefile: Follow.
19
- * script/lib-txt2html.rb: New file.
20
- * script/makemanifest.rb: New file.
21
-
22
- * License.txt: Update license to Ruby license.
23
-
24
- * test/test_autoreload.rb: Sometimes test is failed.
25
-
26
- * default_task.rb: Check file exist in chmod task.
27
-
28
- * default_task.rb: Specify version and download.
29
- * scripts/lib-txt2html.rb: Remove dependency.
30
- * scripts/txt2html: Follow.
31
-
32
- == 2007-07-04
33
-
34
- * License.txt: created.
35
- * README.txt: created.
36
-
37
- * lib/autoreload/version.rb: Truncated.
38
- * Rakefile: Ditto.
39
-
40
- * lib/autoreload.rb: Created.
41
- * test/test_autoreload.rb: Ditto.
42
-
43
- * lib/autoreload.rb: Refactoring.
44
-
45
- == 2007-07-04
46
-
47
- * Init.
48
-
@@ -1,4 +0,0 @@
1
- == 0.0.1 2007-07-01
2
-
3
- * 1 major enhancement:
4
- * Initial release
@@ -1,21 +0,0 @@
1
- Changes.txt
2
- History.txt
3
- License.txt
4
- Manifest.txt
5
- README.txt
6
- Rakefile
7
- default_task.rb
8
- examples/foo.rb
9
- examples/sample1.rb
10
- lib/autoreload.rb
11
- scripts/lib-txt2html.rb
12
- scripts/makemanifest.rb
13
- scripts/txt2html
14
- setup.rb
15
- test/test_autoreload.rb
16
- test/test_helper.rb
17
- website/index.html
18
- website/index.txt
19
- website/javascripts/rounded_corners_lite.inc.js
20
- website/stylesheets/screen.css
21
- website/template.rhtml
data/README.txt DELETED
@@ -1,5 +0,0 @@
1
- README for autoreload
2
- =====================
3
-
4
- 'autoreload' reload the library if the file is updated.
5
-
data/Rakefile DELETED
@@ -1,80 +0,0 @@
1
- require 'fileutils'
2
- include FileUtils
3
- require File.join(File.dirname(__FILE__), 'default_task')
4
- require File.join(File.dirname(__FILE__), 'lib', 'autoreload')
5
-
6
- AUTHOR = 'FIXME full name' # can also be an array of Authors
7
- EMAIL = "FIXME email"
8
- DESCRIPTION = "description of gem"
9
- GEM_NAME = 'autoreload' # what ppl will type to install your gem
10
-
11
- @config_file = "~/.rubyforge/user-config.yml"
12
- @config = nil
13
- def rubyforge_username
14
- unless @config
15
- begin
16
- @config = YAML.load(File.read(File.expand_path(@config_file)))
17
- rescue
18
- puts <<-EOS
19
- ERROR: No rubyforge config file found: #{@config_file}"
20
- Run 'rubyforge setup' to prepare your env for access to Rubyforge
21
- - See http://newgem.rubyforge.org/rubyforge.html for more details
22
- EOS
23
- # "
24
- exit
25
- end
26
- end
27
- @rubyforge_username ||= @config["username"]
28
- end
29
-
30
- RUBYFORGE_PROJECT = 'autoreload' # The unix name for your project
31
- HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
32
- DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
33
-
34
- NAME = "autoreload"
35
- REV = nil
36
- # UNCOMMENT IF REQUIRED:
37
- # REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
38
- VERS = AutoReload::VERSION::STRING + (REV ? ".#{REV}" : "")
39
- CLEAN.include ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store']
40
- RDOC_OPTS = ['--quiet', '--title', 'autoreload documentation',
41
- "--opname", "index.html",
42
- "--line-numbers",
43
- "--main", "README",
44
- "--inline-source"]
45
-
46
- # Generate all the Rake tasks
47
- # Run 'rake -T' to see list of generated tasks (from gem root directory)
48
- hoe = Hoe.new(GEM_NAME, VERS) do |p|
49
- p.author = AUTHOR
50
- p.description = DESCRIPTION
51
- p.email = EMAIL
52
- p.summary = DESCRIPTION
53
- p.url = HOMEPATH
54
- p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
55
- p.test_globs = ["test/**/test_*.rb"]
56
- p.clean_globs |= CLEAN #An array of file patterns to delete on clean.
57
-
58
- # == Optional
59
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
60
- #p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
61
- #p.spec_extras = {} # A hash of extra values to set in the gemspec.
62
- end
63
-
64
- CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\n\n")
65
- PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
66
- hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
67
-
68
- # clear current task
69
- t = Rake.application.lookup(:install_gem)
70
- t.clear_actions if t
71
-
72
- # redefine task
73
- task :install_gem => [:clean, :package] do
74
- if /mswin32/ =~ RUBY_PLATFORM || /cygwin/ =~ RUBY_PLATFORM
75
- sh "gem.cmd install pkg/*.gem" # for Cygwin
76
- else
77
- sh "sudo gem install pkg/*.gem"
78
- end
79
- end
80
-
@@ -1,129 +0,0 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'rake/clean'
4
- require 'rake/testtask'
5
- require 'rake/packagetask'
6
- require 'rake/gempackagetask'
7
- require 'rake/rdoctask'
8
- require 'rake/contrib/rubyforgepublisher'
9
- require 'hoe'
10
- begin
11
- require 'spec/rake/spectask'
12
- rescue LoadError
13
- puts 'To use rspec for testing you must install rspec gem:'
14
- puts '$ sudo gem install rspec'
15
- exit
16
- end
17
-
18
- class Hoe
19
- def extra_deps
20
- @extra_deps.reject { |x| Array(x).first == 'hoe' }
21
- end
22
- end
23
-
24
- desc 'Generate website files'
25
- task :website_generate do
26
- require 'scripts/lib-txt2html'
27
- t2h = Txt2Html.new
28
- Dir['website/**/*.txt'].each do |txt|
29
- puts txt
30
- version = VERS
31
- download = DOWNLOAD_PATH
32
- t2h.translate(txt, txt.gsub(/txt$/, 'html'), version, download)
33
- end
34
- end
35
-
36
- # add chmod.
37
- task :website_generate do
38
- sh %{ chmod -R go+rx website }
39
- end
40
-
41
- desc 'Upload website files to rubyforge'
42
- task :website_upload do
43
- host = "#{rubyforge_username}@rubyforge.org"
44
- remote_dir = "/var/www/gforge-projects/#{PATH}/"
45
- local_dir = 'website'
46
- sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
47
- end
48
-
49
- desc 'Generate and upload website files'
50
- task :website => [:website_generate, :website_upload, :publish_docs]
51
-
52
- desc 'Release the website and new gem version'
53
- task :deploy => [:check_version, :website, :release] do
54
- puts "Remember to create SVN tag:"
55
- puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
56
- "svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
57
- puts "Suggested comment:"
58
- puts "Tagging release #{CHANGES}"
59
- end
60
-
61
- desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
62
- task :local_deploy => [:website_generate, :install_gem]
63
-
64
- task :check_version do
65
- unless ENV['VERSION']
66
- puts 'Must pass a VERSION=x.y.z release version'
67
- exit
68
- end
69
- unless ENV['VERSION'] == VERS
70
- puts "Please update your version.rb to match the release version, currently #{VERS}"
71
- exit
72
- end
73
- end
74
-
75
- desc "Run the specs under spec/models"
76
- Spec::Rake::SpecTask.new do |t|
77
- t.spec_opts = ['--options', "spec/spec.opts"]
78
- t.spec_files = FileList['spec/*_spec.rb']
79
- t.libs << "lib"
80
- end
81
-
82
- # add chmod.
83
- task :docs do
84
- sh %{ chmod -R go+rx doc }
85
- end
86
-
87
- # clear current task
88
- module Rake
89
- class Task
90
- def clear_actions
91
- @actions.clear
92
- end
93
- end
94
- end
95
-
96
- task :clean => [:chmod]
97
-
98
- CHMOD644 = FileList[%w(
99
- Rakefile ChangeLog
100
- **/*.txt
101
- **/*.html
102
- **/*.rhtml
103
- **/*.js
104
- **/*.css
105
- **/*.rb
106
- **/*.opts
107
- )]
108
- CHMOD755 = FileList[%w(scripts/*)]
109
-
110
- desc 'Chmod all files.'
111
- task :chmod do
112
- CHMOD644.each {|f|
113
- File.chmod 0644, f if File.exist? f
114
- }
115
- CHMOD755.each {|f|
116
- File.chmod 0755, f if File.exist? f
117
- }
118
- end
119
-
120
- desc 'Create Manifest.txt file.'
121
- task :manifest => [:chmod, :clean] do
122
- ruby "scripts/makemanifest.rb"
123
- end
124
-
125
- # Add tasks to gem
126
- task :gem => [:manifest]
127
-
128
- desc "Default task is to run specs"
129
- task :default => [:spec]
@@ -1,6 +0,0 @@
1
- # foo.rb
2
- # Change this file during 'sample1.rb' is running.
3
-
4
- def foo
5
- 1
6
- end
@@ -1,13 +0,0 @@
1
- # sample1.rb
2
- # Run this script and change 'foo.rb' during this is running.
3
-
4
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '../lib')
5
- require 'autoreload'
6
- require 'foo'
7
-
8
- autoreload(1, true, 'sample1')
9
-
10
- loop {
11
- puts foo
12
- sleep 1
13
- }