I am looking for a way to, given a package name, load a version of that package that was the newest version at a given date.
For example:
HypotheticalClassLoader loadPackage: 'Athens-Core' onDate: ('12.03.2015' asDate).
Would load the first commit of 'Athens-Core' that is older than 12.03.2015.
What about the following script. It should detect the first version before a given date.
goferReferences := Gofer new
url: 'http://smalltalkhub.com/mc/Pharo/Athens/main';
package: 'Athens-Core'
constraint: [ :goferReference |
goferReference version info date < '12 June 2015' asDate];
resolved.
goferReferences ifNotNil: [
Gofer new
url: 'http://smalltalkhub.com/mc/Pharo/Athens/main';
version: goferReferences first name;
load ]
Related
In groovy I was using below to generate date in the format "2020-09-14T06:00:00Z" in Ready API 3.3.1
def today = new Date()
return today.format("yyyy-MM-dd") + "T" + today.format("HH:mm:ss") +".000Z"
After updating to 3.3.2 It's giving me an error
groovy.lang.MissingMethodException: No signature of method: java.util.Date.format()
is applicable for argument types: (String) values: [yyyy-MM-dd].
Could someome help
In recent versions of Groovy the Date extension methods have been moved to their own library, which you will have to add to your project. For example, if you are using Gradle as your build tool, you may want something like this:
compile group: 'org.codehaus.groovy', name: 'groovy-dateutil', version: '3.0.5'
If using Maven:
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-dateutil</artifactId>
<version>3.0.5</version>
</dependency>
The latest version of these four assemblies are as follows:
Assembly-----------------------------Version
ClosedXml ---------------------------- v0.91.0
DocumentFormat.OpenExcel ---- v2.81
ExcelNumberFormat---------------- v1.0.3
FastMember -------------------------- v1.3.0
Unfortunately, they do not work with one another when deployed to another machine and running within a service application. The ClosedXml seems to have a dependency on DocumentFormat.OpenExcel ver2.7.2, and FastMember 1.0.0.9
What is the latest working versions of these files that are compatible with one another?
I also have found this out it throws an exception in my case
StackTrace = " en System.ThrowHelper.ThrowKeyNotFoundException()\r\n en System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n en ClosedXML.Excel.XLWorksheet.Range(String rangeAddressStr)\r\n en ClosedXML.Excel.XLPrintAreas.Add(String rangeAddress)\r\n ...
was working fine before the upgrade
No version found for #stable of ConfigurationOfOmniBrowser?
Just downloaded Pharo 3 from here: http://files.pharo.org/platform/Pharo3.0-portable.zip
Opened an workspace and did this:
Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfSeaside30';
load.
(Smalltalk at: #ConfigurationOfSeaside30) load.
I get this error:
Well... in Pharo, correct configuration is Seaside3... and it is not in MetacelloRepository since starting in Pharo3 we switched to a "per version" repo.
So, this code should do the work:
Gofer new
smalltalkhubUser: 'Pharo' project: 'MetaRepoForPharo30';
configurationOf: 'Seaside3';
loadStable.
I used the method described here to install Seaside3 on Pharo. All is well, but Scriptaculous doesn't come preinstalled. How do I get it?
Seaside3 :
1: Go to the configuration manager
2: Select the Seaside 3 configuration. Click on Install.
3: Wait while it loads. Takes a couple of minutes on an i7 and a decent network link.
4: Open a Workspace and start a ZincServerAdaptor on the port you like (here 8080):
ZnZincServerAdaptor startOn: 8080. (then CMD+d for Do It)
7: Access Seaside from your browser.
8: Install Scriptaculous, but how?
Johan B's input:
http://forum.world.st/Seaside-How-do-I-install-Scriptaculous-on-a-clean-Seaside-install-via-Configuration-Browser-on-Pharo-td4802930.html
Pharo’s Configuration browser loads the default group of the Metacello configuration, which unfortunately was set to ‘Core’ for Seaside 3.1.
So, you will need to load additional groups programmatically:
(ConfigurationOfSeaside3 project version: #stable) load: #('Scriptaculous' 'JSON')
If you want to get the list of possible groups to load, inspect:
(ConfigurationOfSeaside3 project version: #stable) groups
Install from scratch with:
(ConfigurationOfSeaside3 project version: #stable) load: #('default' 'Scriptaculous' 'JSON')
This is something we fixed for Seaside 3.2, where the default will load everything to help newcomers.
We prefer not to change the existing 3.1 configuration versions to not break existing uses, but it’s fixed in the upcoming version.
Btw, Scriptaculous is really outdated. You will prefer to use jQuery and jQuery-UI (or any other JS framework…)
My findings on the subject:
Well, finally figured it out.
The packages needed for Scriptaculous to work are listed in the book here:
http://book.seaside.st/book/web-20/scriptaculous/frameworks/installation
Then you need to find a repository to get them from, after a little poking around here:
http://www.smalltalkhub.com/mc/Seaside/
I chose the Seaside31 repository, which is what I apparently managed to install a few hours ago.
http://www.smalltalkhub.com/mc/Seaside/Seaside31/main
Then I had to Do-It a couple of times on (maybe there is a faster way to do this):
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'Javascript-Core';
load.
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'Prototype-Core';
load.
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'Scriptaculous-Core';
load.
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'Scriptaculous-Components';
load.
For those looking to install jQuery into Seaside can use these:
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'Javascript-Core';
load.
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'JQuery-Core';
load.
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'JQuery-UI'; "notice that there is no -Core on this one, I don't know why"
load.
If one wants to load a full fledged configuration in Pharo 4.0 (after having loaded Seaside from the configuration browser):
| config groups |
config := (ConfigurationOfSeaside3 project version: #release3).
"Inspect this in case you want to see what's available"
groups := config groups.
"Load the usual suspects"
config load: #('OneClick' 'Javascript' 'Javascript Tests' 'JQuery' 'JQuery Tests' 'JQueryUI' 'JQueryUI Tests' 'JQueryUI Examples' 'REST' 'REST Tests' 'JSON' 'JSON Tests').
An additional interesting configuration to load is Bootstrap.
Check the configuration browser.
So I'm trying to configure security access for some of my methods here, through JMSSecurityExtraBundle. I simply followed the instructions here : JMSSecurityBundle Doc.
I ended up having this in my config.yml file:
jms_security_extra:
secure_controllers: true
secure_all_services: false
method_access_control:
'MyBundle:.*:postEntityDelete': 'hasRole("ROLE_SUPER_ADMIN")'
Now I'm simply getting that error:
InvalidConfigurationException: Unrecognized options "method_access_control" under "jms_security_extra"
How can I have gone wrong on so little? Where's the catch and how do I solve this problem?
Thanks in advance!
Edit:
Deps :
[JMSSecurityExtraBundle]
git=https://github.com/schmittjoh/JMSSecurityExtraBundle.git
target=/bundles/JMS/SecurityExtraBundle
[metadata]
git=https://github.com/schmittjoh/metadata.git
version=1.1.0 ; <- make sure to get 1.1, not 1.0
[JMSAopBundle]
git=https://github.com/schmittjoh/JMSAopBundle.git
target=/bundles/JMS/AopBundle
[cg-library]
git=https://github.com/schmittjoh/cg-library.git
[JMSDiExtraBundle]
git=https://github.com/schmittjoh/JMSDiExtraBundle.git
target=/bundles/JMS/DiExtraBundle
Deps.lock:
symfony v2.0.13
twig v1.7.0
monolog 1.0.2
doctrine-common 2.1.4
doctrine-dbal 2.1.6
doctrine 2.1.6
swiftmailer v4.1.7
assetic v1.0.3
twig-extensions 446d870272cd87a720e95242eade38a2acf56eaa
metadata 1.0.0
SensioFrameworkExtraBundle cb61b92ed55241d93ed9726bc3f5f47c7d2ce8fe
JMSSecurityExtraBundle e752f888c51425f71382c056961f10f2be642102
SensioDistributionBundle 20b66a408084ad8752f98e50f10533f5245310bf
SensioGeneratorBundle b1ccb78c1743f30817b0fce9bb5c6baff6ed7bf8
AsseticBundle v1.0.1
What version of symfony and of the bundle are you using? The documentation you linked is following the master branch. There are links in the upper left to change versions. 1.0 doesn't seem to have that configuration option.
the deps file should contain:
[JMSSecurityExtraBundle]
git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git
target=/bundles/JMS/SecurityExtraBundle
version=origin/master
You can also see here for someone else that had the same issue https://github.com/schmittjoh/JMSSecurityExtraBundle/issues/24