simple_si 0.0.2 → 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.
data/.DS_Store ADDED
Binary file
data/README.md ADDED
@@ -0,0 +1,58 @@
1
+ SimpleSI for RubyMotion
2
+ ====================
3
+
4
+ I wanted a dead simple way to call SIAlertView (https://github.com/Sumi-Interactive/SIAlertView) in one line, similar to BubbleWrap's `App.alert()`.
5
+
6
+
7
+ ## Installation
8
+
9
+ ```ruby
10
+ gem install simple_si
11
+ ```
12
+
13
+ ## Setup
14
+
15
+ Edit the `Rakefile` of your RubyMotion project and add the following require line:
16
+
17
+ ```ruby
18
+ require 'simple_si'
19
+ ```
20
+ or
21
+
22
+ Add simple_si to your Gemfile, and run `bundle install`:
23
+ ```ruby
24
+ gem 'simple_si'
25
+ ```
26
+
27
+ Usage
28
+ ==========
29
+
30
+ Basic:
31
+
32
+ ```ruby
33
+ SimpleSI.alert('Hello World!')
34
+ ```
35
+
36
+ If you want a title:
37
+
38
+ ```ruby
39
+ SimpleSI.alert_with_title('My App', 'Hello World!')
40
+ ```
41
+
42
+ You can also leverage the following transitions:
43
+ ```ruby
44
+ # SIAlertViewTransitionStyleSlideFromBottom (default)
45
+ # SIAlertViewTransitionStyleSlideFromTop
46
+ # SIAlertViewTransitionStyleFade
47
+ # SIAlertViewTransitionStyleBounce
48
+ # SIAlertViewTransitionStyleDropDown
49
+
50
+ SimpleSI.alert('Hello World!', SIAlertViewTransitionStyleDropDown)
51
+ ```
52
+ ## To-do
53
+
54
+ * Write specs
55
+
56
+ ## Contributions
57
+
58
+ Fork, improve, submit a pull request.
@@ -0,0 +1,17 @@
1
+ class SimpleSI
2
+
3
+ def self.alert(text, transition_style = SIAlertViewTransitionStyleSlideFromBottom)
4
+ alert = SIAlertView.alloc.initWithTitle(nil, andMessage:text)
5
+ alert.transitionStyle = transition_style
6
+ alert.addButtonWithTitle("OK", type:SIAlertViewButtonTypeDefault, handler:nil)
7
+ alert.show
8
+ end
9
+
10
+ def self.alert_with_title(title, text, transition_style = SIAlertViewTransitionStyleSlideFromBottom)
11
+ alert = SIAlertView.alloc.initWithTitle(title, andMessage:text)
12
+ alert.transitionStyle = transition_style
13
+ alert.addButtonWithTitle("OK", type:SIAlertViewButtonTypeDefault, handler:nil)
14
+ alert.show
15
+ end
16
+
17
+ end
data/lib/simple_si.rb ADDED
@@ -0,0 +1,15 @@
1
+ unless defined?(Motion::Project::Config)
2
+ raise "This file must be required within a RubyMotion project Rakefile."
3
+ end
4
+
5
+ Motion::Project::App.setup do |app|
6
+ Dir.glob(File.join(File.dirname(__FILE__), 'simple_si/*.rb')).each do |file|
7
+ app.files.unshift(file)
8
+ end
9
+
10
+ app.pods ||= Motion::Project::CocoaPods.new(app)
11
+ app.pods do
12
+ pod 'SIAlertView'
13
+ end
14
+
15
+ end
data/simple_si.gemspec ADDED
@@ -0,0 +1,13 @@
1
+ # -*- encoding: utf-8 -*-
2
+ Gem::Specification.new do |s|
3
+ s.name = "simple_si"
4
+ s.version = '0.0.3'
5
+ s.summary = "Rubymotion gem to easily call Sumi-Interactive's SIAlertView"
6
+ s.description = "Quickly call an SIAlertView in one line: SimpleSI.alert('Hello World!')"
7
+ s.authors = ["Forrest Grant"]
8
+ s.email = "forrest@forrestgrant.com"
9
+ s.homepage = "http://github.com/forrestgrant/simple_si"
10
+
11
+ s.require_paths = ["lib"]
12
+ s.files = `git ls-files`.split($\)
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_si
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -16,7 +16,12 @@ email: forrest@forrestgrant.com
16
16
  executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
- files: []
19
+ files:
20
+ - .DS_Store
21
+ - README.md
22
+ - lib/simple_si.rb
23
+ - lib/simple_si/simple_si.rb
24
+ - simple_si.gemspec
20
25
  homepage: http://github.com/forrestgrant/simple_si
21
26
  licenses: []
22
27
  post_install_message: