kanna 0.0.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.
@@ -0,0 +1,59 @@
1
+ # -*- coding: utf-8 -*-
2
+ namespace :kanna do
3
+ namespace :ios do
4
+ app_name = Rails.application.class.name.split("::").first
5
+ app_name_downcase = app_name.downcase
6
+
7
+ # FIX: 固定値をやめる。どこになるんだ?
8
+ cordova_path = File.join('~', 'install', 'phonegap-2.1.0')
9
+ ios_bin_path = File.join(cordova_path, 'lib', 'ios', 'bin')
10
+ ios_create_command = File.join(ios_bin_path, 'create')
11
+ ios_project_path = File.join(Rails.root, 'tmp', "#{app_name_downcase}-ios")
12
+
13
+ desc "create ios project"
14
+ task init: :environment do
15
+ command = "#{ios_create_command} #{ios_project_path} com.keepintouchapp.ios #{app_name}"
16
+ puts "DO: #{command}"
17
+ system command
18
+ end
19
+
20
+ ios_command_dir = File.join(ios_project_path, 'cordova')
21
+ ios_debug_command = File.join(ios_command_dir, 'debug')
22
+ ios_emulate_command = File.join(ios_command_dir, 'emulate')
23
+ kanna_app_path = File.join(Rails.root, 'app', 'kanna')
24
+ kanna_ios_path = File.join(kanna_app_path, 'ios')
25
+ kanna_www_path = File.join(kanna_app_path, 'www')
26
+ ios_config_path = File.join(ios_project_path, app_name)
27
+
28
+ desc "build ios app"
29
+ task build: :environment do
30
+ cp_www_command = "cp -R #{kanna_www_path} #{ios_project_path}"
31
+ cp_config_command = "cp #{kanna_ios_path}/* #{ios_config_path}"
32
+ debug_command = "PROJECT_NAME=#{app_name} #{ios_debug_command}"
33
+ command = [cp_www_command, cp_config_command, debug_command, ios_emulate_command].join("; ")
34
+ puts "DO: #{command}"
35
+ system command
36
+ end
37
+
38
+ ios_app_path = File.join(ios_project_path, "build", "Release-iphonesimulator", "#{app_name}.app")
39
+ ios_ipa_path = File.join(ios_project_path, "build", "ipa", "#{app_name}.ipa")
40
+
41
+ desc "create ipa # mock"
42
+ task release: :environment do
43
+ command = "/usr/bin/xcrun -sdk iphoneos PackageApplication -v #{ios_app_path} -o #{ios_ipa_path}"
44
+ puts "DO: #{command}"
45
+ system command
46
+ end
47
+
48
+ desc "deploy testflight # mock"
49
+ task deploy: :environment do
50
+ # FIXME: トークンの設定
51
+ testflight_api_token = "testflight_api_token"
52
+ testflight_team_token = "testflight_team_token"
53
+ notes = "notes"
54
+
55
+ command = "/usr/bin/curl http://testflightapp.com/api/builds.json -F file=@\"#{ios_ipa_path}\" -F api_token='#{testflight_api_token}' -F team_token='#{testflight_team_token}' -F notes=\"#{notes}\" -F notify=True"
56
+ puts "DO: #{command}"
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,3 @@
1
+ module Kanna
2
+ VERSION = "0.0.3"
3
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kanna
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Akihiro Matsumura
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-11-27 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activesupport
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.8
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.8
30
+ description: Kanna connect Rails and Cordova. Kanna is framework to create mobile
31
+ application very simple.
32
+ email:
33
+ - mat_aki@sonicgarden.jp
34
+ executables: []
35
+ extensions: []
36
+ extra_rdoc_files: []
37
+ files:
38
+ - .gitignore
39
+ - Gemfile
40
+ - LICENSE.txt
41
+ - README.ja.md
42
+ - README.md
43
+ - Rakefile
44
+ - TODO
45
+ - kanna.gemspec
46
+ - lib/generators/kanna/install/install_generator.rb
47
+ - lib/generators/kanna/install/templates/Guardfile
48
+ - lib/generators/kanna/install/templates/app/kanna/ios/Cordova.plist
49
+ - lib/generators/kanna/install/templates/app/kanna/src/css/application.sass
50
+ - lib/generators/kanna/install/templates/app/kanna/src/haml/index.haml
51
+ - lib/generators/kanna/install/templates/app/kanna/src/js/application.coffee
52
+ - lib/generators/kanna/install/templates/app/kanna/src/js/kanna.coffee
53
+ - lib/generators/kanna/install/templates/app/kanna/www/vendor/cordova-2.1.0.js
54
+ - lib/generators/kanna/install/templates/app/kanna/www/vendor/jquery-1.8.1.min.js
55
+ - lib/generators/kanna/install/templates/app/kanna/www/vendor/json2.js
56
+ - lib/generators/kanna/install/templates/app/kanna/www/vendor/rails_ujs_custom.js
57
+ - lib/kanna.rb
58
+ - lib/kanna/actionview_lookup_context_ext.rb
59
+ - lib/kanna/controller_additions.rb
60
+ - lib/kanna/railtie.rb
61
+ - lib/kanna/tasks/kanna.rake
62
+ - lib/kanna/version.rb
63
+ homepage: ''
64
+ licenses: []
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project:
83
+ rubygems_version: 1.8.23
84
+ signing_key:
85
+ specification_version: 3
86
+ summary: Simple Mobile App Framework for Rails
87
+ test_files: []