hajimeru 0.1.2 → 0.1.3

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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/hajimeru.gemspec +1 -0
  3. data/lib/hajimeru/command.rb +12 -0
  4. data/lib/hajimeru/generator.rb +1 -0
  5. data/lib/hajimeru/generator/groonga_plugin.rb +5 -2
  6. data/lib/hajimeru/generator/sinatra.rb +5 -0
  7. data/lib/hajimeru/generator/templates/groonga_plugin/LICENSE +502 -0
  8. data/lib/hajimeru/generator/templates/groonga_plugin/README.md.tt +64 -0
  9. data/lib/hajimeru/generator/templates/groonga_plugin/configure.ac.tt +1 -1
  10. data/lib/hajimeru/generator/templates/groonga_plugin/plugin_name/plugin_name.c.tt +1 -1
  11. data/lib/hajimeru/generator/templates/groonga_plugin/test/suite/register.expected.tt +1 -1
  12. data/lib/hajimeru/generator/templates/groonga_plugin/test/suite/register.test.tt +1 -1
  13. data/lib/hajimeru/generator/templates/sinatra/Gemfile +12 -0
  14. data/lib/hajimeru/generator/templates/sinatra/LICENSE.txt.tt +22 -0
  15. data/lib/hajimeru/generator/templates/sinatra/README.md.tt +17 -0
  16. data/lib/hajimeru/generator/templates/sinatra/Rakefile +4 -0
  17. data/lib/hajimeru/generator/templates/sinatra/app.rb +7 -1
  18. data/lib/hajimeru/generator/templates/sinatra/assets/js/application.js.es6 +2 -0
  19. data/lib/hajimeru/generator/templates/sinatra/public/.gitkeep +0 -0
  20. data/lib/hajimeru/generator/templates/sinatra/views/layout.haml.tt +1 -0
  21. data/lib/hajimeru/generator/templates/xul/.gitignore +2 -0
  22. data/lib/hajimeru/generator/templates/xul/.gitmodules +3 -0
  23. data/lib/hajimeru/generator/templates/xul/LICENSE +363 -0
  24. data/lib/hajimeru/generator/templates/xul/Makefile.tt +11 -0
  25. data/lib/hajimeru/generator/templates/xul/README.md.tt +7 -0
  26. data/lib/hajimeru/generator/templates/xul/chrome.manifest.tt +5 -0
  27. data/lib/hajimeru/generator/templates/xul/content/overlay.xul.tt +9 -0
  28. data/lib/hajimeru/generator/templates/xul/install.rdf.tt +31 -0
  29. data/lib/hajimeru/generator/templates/xul/locale/en-US/messages.dtd +5 -0
  30. data/lib/hajimeru/generator/templates/xul/locale/en-US/messages.properties +1 -0
  31. data/lib/hajimeru/generator/templates/xul/locale/ja/messages.dtd +5 -0
  32. data/lib/hajimeru/generator/templates/xul/locale/ja/messages.properties +1 -0
  33. data/lib/hajimeru/generator/xul.rb +47 -0
  34. data/lib/hajimeru/version.rb +1 -1
  35. metadata +37 -3
@@ -0,0 +1,11 @@
1
+ PACKAGE_NAME = <%= name %>
2
+
3
+ all: xpi
4
+
5
+ xpi: makexpi/makexpi.sh
6
+ cp makexpi/makexpi.sh ./
7
+ ./makexpi.sh -n $(PACKAGE_NAME) -o
8
+ rm ./makexpi.sh
9
+
10
+ makexpi/makexpi.sh:
11
+ git submodule update --init
@@ -0,0 +1,7 @@
1
+ # <%= name %>
2
+
3
+ TODO: Write description.
4
+
5
+ ## Usage
6
+
7
+ TODO: Write usage.
@@ -0,0 +1,5 @@
1
+ content <%= name %> content/
2
+ locale <%= name %> en-US locale/en-US/
3
+ locale <%= name %> ja locale/ja/
4
+
5
+ component {<%= config[:uuid] %>} components/Startup.js
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0"?>
2
+ <overlay id="<%= name %>Overlay"
3
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
4
+ <menupopup id="menu_ToolsPopup">
5
+ <menuitem id="<%= name %>Menuitem"
6
+ label="Hello, World!"
7
+ insertbefore="sanitizeSeparator" />
8
+ </menupopup>
9
+ </overlay>
@@ -0,0 +1,31 @@
1
+ <0?xml version="1.0" encoding="UTF-8"?>
2
+ <RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
3
+ xmlns:NC="http://home.netscape.com/NC-rdf#"
4
+ xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
5
+ <RDF:Description RDF:about="urn:mozilla:install-manifest"
6
+ em:id="<%= name %>@<%= config[:email].gsub(/@/, ".") %>"
7
+ em:name="<%= name %>"
8
+ em:version="0.1"
9
+ em:description="TODO: Write description."
10
+ em:creator="<%= config[:author] %>"
11
+ em:homepageURL="https://github.com/[USER]/<%= name %>"
12
+ em:type="2">
13
+
14
+ <!--em:updateURL></em:updateURL-->
15
+ <!--em:updateKey></em:updateKey-->
16
+
17
+ <!-- Firefox -->
18
+ <em:targetApplication>
19
+ <RDF:Description em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
20
+ em:minVersion="38.0"
21
+ em:maxVersion="45.*" />
22
+ </em:targetApplication>
23
+
24
+ <!-- Thunderbird -->
25
+ <em:targetApplication>
26
+ <RDF:Description em:id="{3550f703-e582-4d05-9a08-453d09bdfdc6}"
27
+ em:minVersion="38.0"
28
+ em:maxVersion="45.*" />
29
+ </em:targetApplication>
30
+ </RDF:Description>
31
+ </RDF:RDF>
@@ -0,0 +1,5 @@
1
+ <!ENTITY config.title "Configuration Dialog">
2
+ <!ENTITY config.general "General">
3
+ <!ENTITY config.testBoolean "This is a boolean setting.">
4
+ <!ENTITY config.appearance "Appearance">
5
+ <!ENTITY config.testInteger "This is an integer.">
@@ -0,0 +1 @@
1
+ config.labelFromProperties=Label defined in a properties file
@@ -0,0 +1,5 @@
1
+ <!ENTITY config.title "設定ダイアログ">
2
+ <!ENTITY config.general "全般">
3
+ <!ENTITY config.testBoolean "真偽値の設定">
4
+ <!ENTITY config.appearance "外観">
5
+ <!ENTITY config.testInteger "整数値の設定">
@@ -0,0 +1 @@
1
+ config.labelFromProperties=Propertiesファイルで定義されたラベル
@@ -0,0 +1,47 @@
1
+ require "thor"
2
+ require "securerandom"
3
+
4
+ module Hajimeru
5
+ module Generator
6
+ class Xul < Thor::Group
7
+ include Thor::Actions
8
+
9
+ argument :name
10
+
11
+ def self.source_root
12
+ File.join(File.dirname(__FILE__), "templates", "xul")
13
+ end
14
+
15
+ def create_files
16
+ git_user_name = `git config user.name`.chomp
17
+ git_user_email = `git config user.email`.chomp
18
+ config = {
19
+ author: (git_user_name || "TODO: YOUR NAME"),
20
+ email: (git_user_email || "TODO: YOUR EMAIL"),
21
+ uuid: SecureRandom.uuid,
22
+ }
23
+ [
24
+ ".gitignore",
25
+ #".gitmodules",
26
+ "LICENSE",
27
+ "Makefile.tt",
28
+ "README.md.tt",
29
+ "chrome.manifest.tt",
30
+ "content/overlay.xul.tt",
31
+ "locale/en-US/messages.dtd",
32
+ "locale/en-US/messages.properties",
33
+ "locale/ja/messages.dtd",
34
+ "locale/ja/messages.properties",
35
+ "install.rdf.tt",
36
+ ].each do |path|
37
+ output_path = path.gsub(/\.tt\z/, "")
38
+ template(path, File.join(name, output_path), config)
39
+ end
40
+ Dir.chdir(name) do
41
+ system("git", "init")
42
+ system("git", "submodule", "add", "https://github.com/piroor/makexpi")
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -1,3 +1,3 @@
1
1
  module Hajimeru
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hajimeru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masafumi Yokoyama
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-05 00:00:00.000000000 Z
11
+ date: 2016-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: launchy
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -91,7 +105,9 @@ files:
91
105
  - lib/hajimeru/generator/javascript.rb
92
106
  - lib/hajimeru/generator/sinatra.rb
93
107
  - lib/hajimeru/generator/templates/groonga_plugin/.gitignore
108
+ - lib/hajimeru/generator/templates/groonga_plugin/LICENSE
94
109
  - lib/hajimeru/generator/templates/groonga_plugin/Makefile.am.tt
110
+ - lib/hajimeru/generator/templates/groonga_plugin/README.md.tt
95
111
  - lib/hajimeru/generator/templates/groonga_plugin/autogen.sh
96
112
  - lib/hajimeru/generator/templates/groonga_plugin/configure.ac.tt
97
113
  - lib/hajimeru/generator/templates/groonga_plugin/plugin_name/Makefile.am.tt
@@ -105,10 +121,28 @@ files:
105
121
  - lib/hajimeru/generator/templates/javascript/index.js
106
122
  - lib/hajimeru/generator/templates/sinatra/.gitignore
107
123
  - lib/hajimeru/generator/templates/sinatra/Gemfile
124
+ - lib/hajimeru/generator/templates/sinatra/LICENSE.txt.tt
125
+ - lib/hajimeru/generator/templates/sinatra/README.md.tt
126
+ - lib/hajimeru/generator/templates/sinatra/Rakefile
108
127
  - lib/hajimeru/generator/templates/sinatra/app.rb
128
+ - lib/hajimeru/generator/templates/sinatra/assets/js/application.js.es6
109
129
  - lib/hajimeru/generator/templates/sinatra/config.ru
130
+ - lib/hajimeru/generator/templates/sinatra/public/.gitkeep
110
131
  - lib/hajimeru/generator/templates/sinatra/views/index.haml
111
132
  - lib/hajimeru/generator/templates/sinatra/views/layout.haml.tt
133
+ - lib/hajimeru/generator/templates/xul/.gitignore
134
+ - lib/hajimeru/generator/templates/xul/.gitmodules
135
+ - lib/hajimeru/generator/templates/xul/LICENSE
136
+ - lib/hajimeru/generator/templates/xul/Makefile.tt
137
+ - lib/hajimeru/generator/templates/xul/README.md.tt
138
+ - lib/hajimeru/generator/templates/xul/chrome.manifest.tt
139
+ - lib/hajimeru/generator/templates/xul/content/overlay.xul.tt
140
+ - lib/hajimeru/generator/templates/xul/install.rdf.tt
141
+ - lib/hajimeru/generator/templates/xul/locale/en-US/messages.dtd
142
+ - lib/hajimeru/generator/templates/xul/locale/en-US/messages.properties
143
+ - lib/hajimeru/generator/templates/xul/locale/ja/messages.dtd
144
+ - lib/hajimeru/generator/templates/xul/locale/ja/messages.properties
145
+ - lib/hajimeru/generator/xul.rb
112
146
  - lib/hajimeru/version.rb
113
147
  homepage: https://github.com/myokoym/hajimeru
114
148
  licenses:
@@ -130,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
164
  version: '0'
131
165
  requirements: []
132
166
  rubyforge_project:
133
- rubygems_version: 2.5.0
167
+ rubygems_version: 2.5.1
134
168
  signing_key:
135
169
  specification_version: 4
136
170
  summary: A scaffold generator for your project.