copy_tuner_client 0.1.0.beta → 0.1.1.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjkxOTQ4ODNlMDVlNDNkNWYxNjg1NTI5ZTMxNmY3ZTg4ZDMzYzgxNw==
4
+ MjhkNTQ2NTU0YjljNTc3NmMwNWNhYWQyOWIxYmJlZjFkYjM0YmUwZA==
5
5
  data.tar.gz: !binary |-
6
- ODE4OTVlM2JmNWY5YjQyZjViMDBlNzdiYTFhOTlhNGMwMzQ5YjU2Yg==
6
+ YjRmM2NiZmZmMjJmYmEzYTFhYjc2NTBiM2U1MmYwODRjZTY5ZTg3Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTA4YzcxOGZmMDNmYjNjMGIyZjhiYjYxNjNlYzc5YTE5NzU1YWVhMjNmZDI4
10
- M2JlN2MwN2E3NmQ5ZWFhNzM1MzlmODE5N2I1MWE1NTVkOGUzN2EyMWNiMjc5
11
- MDEyOTQwMDkyYzU4OTg2NDdlYzFiZmI1M2QwYWJmODMyMmNmZDM=
9
+ OTcwOWJhODFkNDRjNzUzNzQ2OGNkNmJjNWZmNjBkZTg2NmE4MDBmNGY4ZWU2
10
+ NzExMWM1Y2M2NTMxZTllMjBiNThhZjlhMGMzZDFhYTA1Zjk5YmNkZTE2ODZm
11
+ ZTY3OTlkZDg0MjI1MjVjZTZiYzU1MjFmZmFjNDg5NDAyZjFmYWQ=
12
12
  data.tar.gz: !binary |-
13
- M2E0ZGMwN2E2MzNmNzM0MDliYmUwOTU3MmMxZjEzNGYzOTQ1NTY5OWE0OTU5
14
- ODZlMTBlYzFhNjAyNWNlYWYwNzE4ZDFlNjBhNmJkNDQ2MGJhN2I3Yjc1YzU0
15
- ZTA5MTRmZDI1YjJkOGNmNmNmOWQ2NzQ3MWM0NzVkNTUwMjZkZDk=
13
+ NzIxYTYyZGJmMDc2YjI1NWQ3NDlmYTkxMDViMDViMmZiNjRlMzRmMzdkMDdm
14
+ YTg5MmNjOWI3ZDA1M2U3YTY0MjUyNDljZTNlYzIyYjM5NzQyZTRhMTZiOWFh
15
+ YWNkNGI2M2ZiZTE5MjY0ODAzMWU5YzhmN2M3N2RmMjM3ZGEyMjA=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- copy_tuner_client (0.1.0.beta)
4
+ copy_tuner_client (0.1.1.beta)
5
5
  i18n (>= 0.5.0)
6
6
  json
7
7
 
@@ -47,7 +47,7 @@ Xray.findTemplates = -> util.bm 'findTemplates', ->
47
47
  # Find the <!-- XRAY END ... --> comment for each. Everything between the
48
48
  # start and end comment becomes the contents of an Xray.TemplateSpecimen.
49
49
  for comment in comments
50
- [_, id, path] = comment.data.match(/^XRAY START (\d+) (.*)$/)
50
+ [_, id, path, url] = comment.data.match(/^XRAY START (\d+) (\S*) (\S*)/)
51
51
  $templateContents = new jQuery
52
52
  el = comment.nextSibling
53
53
  until !el or (el.nodeType == 8 and el.data == "XRAY END #{id}")
@@ -61,10 +61,11 @@ Xray.findTemplates = -> util.bm 'findTemplates', ->
61
61
  Xray.TemplateSpecimen.add $templateContents,
62
62
  name: path.split('/').slice(-1)[0]
63
63
  path: path
64
+ url: url
64
65
 
65
66
  # Open the given filesystem path by calling out to Xray's server.
66
- Xray.open = (path) ->
67
- $.ajax(url: "/_xray/open?path=#{path}")
67
+ Xray.open = (url) ->
68
+ window.open(url, null, 'width=700, height=500')
68
69
 
69
70
  # Show the Xray overlay
70
71
  Xray.show = (type = null) ->
@@ -100,6 +101,7 @@ class Xray.Specimen
100
101
  @$contents = $(contents)
101
102
  @name = info.name
102
103
  @path = info.path
104
+ @url = info.url
103
105
 
104
106
  remove: ->
105
107
  idx = @constructor.all.indexOf(this)
@@ -119,7 +121,7 @@ class Xray.Specimen
119
121
  top : @$contents.css('top')
120
122
  left : @$contents.css('left')
121
123
 
122
- @$box.click => Xray.open @path
124
+ @$box.click => Xray.open @url + '/blurbs/' + @path + '/edit'
123
125
  @$box.append @makeLabel
124
126
 
125
127
  makeLabel: =>
@@ -18,7 +18,7 @@ module CopyTunerClient
18
18
  def self.augment_template(source, key)
19
19
  id = next_id
20
20
  # skim doesn't allow html comments, so use skim's comment syntax if it's skim
21
- augmented = "<!--XRAY START #{id} #{key}-->\n<span>#{source}</span>\n<!--XRAY END #{id}-->"
21
+ augmented = "<!--XRAY START #{id} #{key} #{CopyTunerClient.configuration.project_url} -->\n<span>#{source}</span>\n<!--XRAY END #{id}-->"
22
22
  ActiveSupport::SafeBuffer === source ? ActiveSupport::SafeBuffer.new(augmented) : augmented
23
23
  end
24
24
 
@@ -22,6 +22,10 @@ module CopyTunerClient
22
22
  end
23
23
  end
24
24
 
25
+ initializer "copy_tuner.assets.precompile", group: :assets do |app|
26
+ app.config.assets.precompile += ["copyray.js", "copyray.css"]
27
+ end
28
+
25
29
  rake_tasks do
26
30
  load "tasks/copy_tuner_client_tasks.rake"
27
31
  end
@@ -1,6 +1,6 @@
1
1
  module CopyTunerClient
2
2
  # Client version
3
- VERSION = '0.1.0.beta'
3
+ VERSION = '0.1.1.beta'
4
4
 
5
5
  # API version being used to communicate with the server
6
6
  API_VERSION = '2.0'.freeze
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copy_tuner_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.beta
4
+ version: 0.1.1.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - SonicGarden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-17 00:00:00.000000000 Z
11
+ date: 2014-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n