Skip to content

Commit

Permalink
Merge pull request #20 from kyan/feature/yosemite_updates
Browse files Browse the repository at this point in the history
Yosemite updates
  • Loading branch information
whomwah committed Jan 28, 2015
2 parents b9f84dd + ba512e8 commit 7685ea9
Show file tree
Hide file tree
Showing 158 changed files with 14,772 additions and 3,233 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0-p353
ruby-2.2.0
11 changes: 6 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
source 'https://rubygems.org'

gem 'rake'
gem "motion-cocoapods", "~> 1.4.0"
gem "motion-sparkle", "~> 0.0.3", :git => '[email protected]:whomwah/motion-sparkle.git'
gem "bubble-wrap", "~> 1.4.0"
gem 'sugarcube', "~> 1.3.7", :require => [
gem "motion-cocoapods"
gem 'afmotion'
gem "motion-sparkle"
gem "bubble-wrap"
gem 'sugarcube', :require => [
'sugarcube-attributedstring',
]
gem "ib", "~> 0.4.3"
gem "ib"
#gem "kyan_jukebox_websocket_lib", :path => "/Users/duncan/_dev/kyan/gems/kyan_jukebox_websocket_lib"
gem "kyan_jukebox", :git => '[email protected]:kyan/kyan_jukebox_websocket_lib.git'
113 changes: 64 additions & 49 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,85 @@ GIT
specs:
kyan_jukebox (0.2.0)

GIT
remote: [email protected]:whomwah/motion-sparkle.git
revision: bc1a604dc58b51fef2c099a6c4950e7a9a53d414
specs:
motion-sparkle (0.0.3)

GEM
remote: https://rubygems.org/
specs:
activesupport (3.2.16)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
bubble-wrap (1.4.0)
claide (0.4.0)
cocoapods (0.29.0)
activesupport (>= 3.2.15, < 4)
claide (~> 0.4.0)
cocoapods-core (= 0.29.0)
cocoapods-downloader (~> 0.3.0)
cocoapods-try-release-fix (~> 0.1.1)
activesupport (4.2.0)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
afmotion (2.5)
motion-cocoapods (>= 1.4.1)
motion-require (>= 0.1)
bubble-wrap (1.7.1)
bubble-wrap-http (= 1.7.1)
bubble-wrap-http (1.7.1)
claide (0.7.0)
cocoapods (0.35.0)
activesupport (>= 3.2.15)
claide (~> 0.7.0)
cocoapods-core (= 0.35.0)
cocoapods-downloader (~> 0.8.0)
cocoapods-plugins (~> 0.3.1)
cocoapods-trunk (~> 0.4.1)
cocoapods-try (~> 0.4.2)
colored (~> 1.2)
escape (~> 0.0.4)
json_pure (~> 1.8)
nap (~> 0.5)
molinillo (~> 0.1.2)
nap (~> 0.8)
open4 (~> 1.3)
xcodeproj (~> 0.14.1)
cocoapods-core (0.29.0)
activesupport (>= 3.2.15, < 4)
xcodeproj (~> 0.20.2)
cocoapods-core (0.35.0)
activesupport (>= 3.2.15)
fuzzy_match (~> 2.0.4)
json_pure (~> 1.8)
nap (~> 0.5)
cocoapods-downloader (0.3.0)
cocoapods-try-release-fix (0.1.1)
nap (~> 0.8.0)
cocoapods-downloader (0.8.1)
cocoapods-plugins (0.3.2)
nap
cocoapods-trunk (0.4.1)
nap (>= 0.8)
netrc (= 0.7.8)
cocoapods-try (0.4.3)
colored (1.2)
escape (0.0.4)
fuzzy_match (2.0.4)
i18n (0.6.9)
ib (0.4.3)
thor (>= 0.15.4)
tilt (>= 1.4.1)
xcodeproj (>= 0.11.1)
json_pure (1.8.1)
motion-cocoapods (1.4.0)
cocoapods (>= 0.26.2)
multi_json (1.8.4)
nap (0.6.0)
open4 (1.3.0)
rake (10.1.1)
sugarcube (1.3.11)
thor (0.18.1)
tilt (2.0.0)
xcodeproj (0.14.1)
activesupport (~> 3.0)
i18n (0.7.0)
ib (0.7.2)
thor (~> 0.15.4)
tilt (~> 1.4.1)
xcodeproj (~> 0.17)
json (1.8.2)
minitest (5.5.1)
molinillo (0.1.2)
motion-cocoapods (1.7.0)
cocoapods (>= 0.34)
motion-require (0.2.0)
motion-sparkle (0.0.5)
nap (0.8.0)
netrc (0.7.8)
open4 (1.3.4)
rake (10.4.2)
sugarcube (3.1.1)
thor (0.15.4)
thread_safe (0.3.4)
tilt (1.4.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
xcodeproj (0.20.2)
activesupport (>= 3)
colored (~> 1.2)
rake

PLATFORMS
ruby

DEPENDENCIES
bubble-wrap (~> 1.4.0)
ib (~> 0.4.3)
afmotion
bubble-wrap
ib
kyan_jukebox!
motion-cocoapods (~> 1.4.0)
motion-sparkle (~> 0.0.3)!
motion-cocoapods
motion-sparkle
rake
sugarcube (~> 1.3.7)
sugarcube
7 changes: 4 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,28 @@ require 'bundler'
Bundler.require

require 'bubble-wrap/core'
require 'bubble-wrap/http'

Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'KyanBar'
app.icon = "icon.icns"
app.identifier = 'com.kyan.kyanbar'
app.deployment_target = '10.8'
app.codesign_for_release = false

app.info_plist['NSUIElement'] = 1
app.info_plist['NSHumanReadableCopyright'] = 'Copyright © 2013, Kyan Ltd'

app.pods do
pod 'SocketRocket'
pod 'MASShortcut'
pod "AFNetworking", "~> 2.0"
end

app.sparkle do
release :base_url, 'https://raw.github.com/kyan/kyan_bar/master'
release :package_url, 'https://github.com/kyan/kyan_bar/releases/download'
release :version, '1.3.1'
release :package_base_url, 'https://github.com/kyan/kyan_bar/releases/download'
release :version, '1.3.3'

# Optional settings
release :feed_filename, 'releases.xml'
Expand Down
1 change: 1 addition & 0 deletions app/_buttons/vote_button.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def initWithVote vote
button.setBezelStyle(NSTexturedSquareBezelStyle)
button.setButtonType(NSMomentaryPushButton)
button.setAction "register_vote:"
button.setFocusRingType(NSFocusRingTypeNone)

if vote
button.cell.setImage(NSImage.imageNamed(NSImageNameAddTemplate))
Expand Down
5 changes: 3 additions & 2 deletions app/_views/nowplaying_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def initWithFrame(frame)

@metrics_dict = {
"padding" => GLOBAL_H_PADDING,
"vpadding" => 5,
"image_side" => 50,
"h_spacing" => 5,
"title_h" => 18,
Expand All @@ -37,7 +38,7 @@ def initWithFrame(frame)

constraints = []
constraints += NSLayoutConstraint.constraintsWithVisualFormat(
"V:|[image(==image_side)]|",
"V:|-vpadding-[image(==image_side)]|",
options:NSLayoutFormatAlignAllLeft,
metrics:metrics_dict,
views:views_dict
Expand Down Expand Up @@ -67,7 +68,7 @@ def initWithFrame(frame)
views:views_dict
)
constraints += NSLayoutConstraint.constraintsWithVisualFormat(
"V:|-(-2)-[title(title_h)]-(-2)-[artist(artist_h)]-(-3)-[album(album_h)]-(-3)-[addedby(addedby_h)]",
"V:|-vpadding-[title(title_h)]-(-2)-[artist(artist_h)]-(-3)-[album(album_h)]-(-3)-[addedby(addedby_h)]",
options:0,
metrics:metrics_dict,
views:views_dict
Expand Down
17 changes: 9 additions & 8 deletions app/_windows/jukebox_control_window.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ def build_views
}

metrics_dict = {
"padding" => GLOBAL_H_PADDING,
"padding_t" => 9,
"padding_small" => 4,
"padding_vsmall" => 4,
"default_width" => 200,
"max_width" => 350,
"progress_h" => 1
"padding" => GLOBAL_H_PADDING,
"padding_t" => 4,
"padding_t_vote_btn" => 10,
"padding_small" => 4,
"padding_vsmall" => 4,
"default_width" => 200,
"max_width" => 350,
"progress_h" => 1
}

views_dictionary.each do |key, view|
Expand All @@ -60,7 +61,7 @@ def build_views
views:views_dictionary
)
constraints += NSLayoutConstraint.constraintsWithVisualFormat(
"V:|-padding_t-[vote_buttons]-padding_small-[progress(progress_h)]-padding_vsmall-[vote_metrics]|",
"V:|-padding_t_vote_btn-[vote_buttons]-padding_small-[progress(progress_h)]-padding_vsmall-[vote_metrics]|",
options:0,
metrics:metrics_dict,
views:views_dictionary
Expand Down
8 changes: 4 additions & 4 deletions app/app_delegate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ def register_defaults
{ SHOW_JB_DEFAULT => false }
)

MASShortcut.registerGlobalShortcutWithUserDefaultsKey(
U_VOTE_SHORTCUT_VAR, handler: lambda do
MASShortcutBinder.sharedBinder.bindShortcutWithDefaultsKey(U_VOTE_SHORTCUT_VAR,
toAction: lambda do
VoteHandler.register(true)
end
)

MASShortcut.registerGlobalShortcutWithUserDefaultsKey(
D_VOTE_SHORTCUT_VAR, handler: lambda do
MASShortcutBinder.sharedBinder.bindShortcutWithDefaultsKey(D_VOTE_SHORTCUT_VAR,
toAction: lambda do
VoteHandler.register(false)
end
)
Expand Down
4 changes: 2 additions & 2 deletions app/lib/vote_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ def self.register(vote)

def register
if valid?
BW::HTTP.get(vote_url) do |response|
AFMotion::HTTP.get(vote_url) do |response|
if response.body.to_s.include?('login details incorrect')
alert_creds_wrong
else
response.ok?
response.success?
end
end
else
Expand Down
5 changes: 5 additions & 0 deletions app/menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ def build_menu(menu)
menu.removeAllItems

flags = (NSEvent.modifierFlags & NSDeviceIndependentModifierFlagsMask)

# If you hold the ALT key and display the
# menu it will show an extra item that lets
# you refersh your connection to the jukebox
#
if flags == NSAlternateKeyMask
menu.addItem(build_secret_refresh)
add_seperator_for(menu)
Expand Down
26 changes: 21 additions & 5 deletions ib.xcodeproj/Stubs.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Generated by IB v0.4.3 gem. Do not edit it manually
// Generated by IB v0.7.2 gem. Do not edit it manually
// Run `rake ib:open` to refresh

#import <AppKit/AppKit.h>
#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <Carbon/Carbon.h>
#import <CoreGraphics/CoreGraphics.h>
#import <CoreServices/CoreServices.h>
#import <Foundation/Foundation.h>
#import <Security/Security.h>
#import <SystemConfiguration/SystemConfiguration.h>

@interface VoteButton: NSButton
-(IBAction) initWithVote:(id) vote;
Expand All @@ -31,6 +31,7 @@
-(IBAction) refresh:(id) jukebox;
-(IBAction) track;
-(IBAction) rating;
-(IBAction) time;
-(IBAction) draw_title_box;
-(IBAction) draw_artist_box;
-(IBAction) draw_album_box;
Expand All @@ -43,6 +44,18 @@
-(IBAction) update_image;
-(IBAction) update_votes;
-(IBAction) update_vote_txt;
-(IBAction) update_progress;

@end

@interface ProgressView: NSView
-(IBAction) init;
-(IBAction) tag;
-(IBAction) drawRect:(id) dirtyRect;
-(IBAction) increment_timer;
-(IBAction) progress_percent;
-(IBAction) progress;
-(IBAction) duration_to_seconds:(id) str;

@end

Expand Down Expand Up @@ -80,19 +93,22 @@

@end

@interface AppDelegate: UIResponder <UIApplicationDelegate>
@interface AppDelegate: NSObject <NSApplicationDelegate>
-(IBAction) applicationDidFinishLaunching:(id) notification;
-(IBAction) build_status;
-(IBAction) build_preferences:(id) sender;
-(IBAction) update_status_bar_icon:(id) active;
-(IBAction) build_jukebox_controls;
-(IBAction) remove_jukebox_controls;
-(IBAction) hide_jukebox_controls;
-(IBAction) show_jukebox_controls;
-(IBAction) force_reconnect_to_websocket_server;
-(IBAction) register_defaults;
-(IBAction) build_jukebox;
-(IBAction) jukebox;
-(IBAction) connect_to_websocket_server;
-(IBAction) update_jukebox_controls_button_state:(id) state;
-(IBAction) handle_websocket_connection:(id) n;

@end

Expand Down
5 changes: 4 additions & 1 deletion ib.xcodeproj/Stubs.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by IB v0.4.3 gem. Do not edit it manually
// Generated by IB v0.7.2 gem. Do not edit it manually
// Run `rake ib:open` to refresh

#import "Stubs.h"
Expand All @@ -12,6 +12,9 @@ @implementation AlbumArtView
@implementation NowplayingView
@end

@implementation ProgressView
@end

@implementation VoteButtonsView
@end

Expand Down
Loading

0 comments on commit 7685ea9

Please sign in to comment.